Docs: Add guide for incremental adoption#9215
Docs: Add guide for incremental adoption#9215runspired merged 20 commits intowarp-drive-data:mainfrom
Conversation
runspired
left a comment
There was a problem hiding this comment.
Overall looking good, left some small cleanups
|
|
I also do not know how much hand-holding is needed here, but maybe it should be mentioned that the |
|
hey @fry69 thanks for review and testing, good inputs - I will update accordingly |
|
The goal is to get this working, right? IMHO nothing is more frustrating that simple sample code which does not work. I just want to point out some pitfalls, here are some others:
This the // eslint-disable-next-line ember/use-ember-data-rfc-395-imports
import Store from 'ember-data/store';
import { CacheHandler } from '@ember-data/store';
import RequestManager from '@ember-data/request';
import Fetch from '@ember-data/request/fetch';
import { LegacyNetworkHandler } from '@ember-data/legacy-compat';
const APIKeyHandler = {
request({ request }, next) {
console.log('APIKeyHandler() called');
const headers = new Headers(request.headers);
headers.append(
// see AuthHandler example
);
return next(Object.assign({}, request, { headers }));
}
}
export default class MyStore extends Store {
requestManager: RequestManager;
constructor(args) {
super(args);
this.requestManager = new RequestManager;
this.requestManager.use([LegacyNetworkHandler, APIKeyHandler, Fetch]);
this.requestManager.useCache(CacheHandler);
}
} |
3422008 to
e5b7381
Compare
|
Latest version looks great, thank you @Baltazore |
|
@runspired where do we put it? I need to update the location of file, and then fix nav links. But overall I think this is ready |
9aed9f2 to
cbb740c
Compare
| import type Book from '../models/book'; | ||
| import type Genre from '../models/genre'; | ||
|
|
||
| setBuildURLConfig({ |
There was a problem hiding this comment.
Above this is recommended to call this function in app/app.js, for consistency, maybe it would be better to use the recommandation ?
There was a problem hiding this comment.
same as above, up to change still
There was a problem hiding this comment.
app.js makes the most sense
|
@sly7-7 thanks for review, would need to finalize some questions |
| import type Book from '../models/book'; | ||
| import type Genre from '../models/genre'; | ||
|
|
||
| setBuildURLConfig({ |
There was a problem hiding this comment.
same as above, up to change still
|
@runspired apparently I don't know how to use github (only gitlab on work 😄 ) |
78dfe7b to
ed50e5f
Compare
1782214 to
e9050cc
Compare
|
@Baltazore Did you just do a rebase ? |
yes, have I lost something ? |
|
I don't think so, actually I was speaking with @runspired and he asked me if I could make the rebase, because he wanted to merge :) |
|
@runspired, @Baltazore has been quickier 😄 so I guess you can merge |
Co-authored-by: Chris Thoburn <[email protected]>
Co-authored-by: Chris Thoburn <[email protected]>
aff8f21 to
eb6fde2
Compare
Description
Working on guides for incremental adoption of new APIs of EmberData
Rendered
Notes for the release
guide for incremental adoption