Skip to content
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

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

MehulKChaudhari
Copy link

@MehulKChaudhari MehulKChaudhari commented May 31, 2024

This is to make changes to this page

Changes related to ember-data request service paradigm RFC

Copy link

netlify bot commented May 31, 2024

Deploy Preview for ember-guides ready!

Name Link
🔨 Latest commit e6448df
🔍 Latest deploy log https://app.netlify.com/sites/ember-guides/deploys/67ba07911301ae0008dfffa6
😎 Deploy Preview https://deploy-preview-2030--ember-guides.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@Baltazore Baltazore left a 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.

@MehulKChaudhari MehulKChaudhari marked this pull request as ready for review August 9, 2024 16:47
Copy link

@Baltazore Baltazore left a 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:
Copy link
Contributor

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.

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.