-
-
Notifications
You must be signed in to change notification settings - Fork 6
fix: update docs to reflect correct record handling #18
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
fix: update docs to reflect correct record handling #18
Conversation
✅ Deploy Preview for request-service-cheat-sheet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -7,7 +6,7 @@ const request = updateRecord(user); | |||
request.body = JSON.stringify( | |||
serializePatch( | |||
store.cache, | |||
recordIdentifierFor(user) | |||
user |
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.
this one too keeps the recordIdentifierFor
usage
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.
mostly gets it to the right place, a couple of overly aggressive changes to backout.
Basically:
- inside a handler, the builders will have given you an identifier already
- outside a handler, where you have the record instance, you need to get the identifier
Got it. Thanks for explaining :) |
This PR will fix the bug in documentation in
http://localhost:4200/#updating-data__create-record
where we userecordIdentifierFor(data.record)
in request body but since data.record is already an identifier removed it.Ref discussion on discord: https://discord.com/channels/480462759797063690/486549196837486592/1342571022221840555
Changes:
recordIdentifierFor(data.record)
since data.record is already an identifier.ember serve
tonpm run start
in contributing.md as per RFC #Standardize use of scripts in package.json for common tasks emberjs/rfcs#831.Creating/Updating Data
section.