-
-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update finding Record
section in ember-data guides to teach request service
#2030
base: master
Are you sure you want to change the base?
Update finding Record
section in ember-data guides to teach request service
#2030
Conversation
✅ Deploy Preview for ember-guides ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job overall, still have some questions to resolve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code parts looks correct, added minor change requests for consistency.
someone please review is linguistically all sounds good
Use [`store.findRecord()`](https://api.emberjs.com/ember-data/release/classes/Store/methods/findRecord?anchor=findRecord) to retrieve a record by its type and ID. | ||
This will return a promise that fulfills with the requested record: | ||
Use [`findRecord()`](https://api.emberjs.com/ember-data/5.3/functions/@ember-data%2Fjson-api%2Frequest/findRecord) to retrieve a record by its type and ID. | ||
This will return a single `record` or a `array` depends upon the response from server: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably introduce builders / the concept of the request first, because this function won't do this on its own and this particular one builds a json:api specific request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, that Makes sense. But the builder or the concept of the request will be in a separate document, right? Since this is specific to finding records.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a chicken/egg problem, unsure if its better in a separate file or not because its likely you want to introduce them together
db66780
to
1ccbdb0
Compare
This is to make changes to this page
Changes related to ember-data request service paradigm RFC