Skip to content

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

Conversation

MehulKChaudhari
Copy link
Member

This PR will fix the bug in documentation in http://localhost:4200/#updating-data__create-record where we use recordIdentifierFor(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:

Copy link

netlify bot commented Feb 22, 2025

Deploy Preview for request-service-cheat-sheet ready!

Name Link
🔨 Latest commit 597ad09
🔍 Latest deploy log https://app.netlify.com/sites/request-service-cheat-sheet/deploys/67bad07f3760760008301acb
😎 Deploy Preview https://deploy-preview-18--request-service-cheat-sheet.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.

@@ -7,7 +6,7 @@ const request = updateRecord(user);
request.body = JSON.stringify(
serializePatch(
store.cache,
recordIdentifierFor(user)
user
Copy link
Contributor

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

Copy link
Contributor

@runspired runspired left a 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

@MehulKChaudhari
Copy link
Member Author

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 :)

@MinThaMie MinThaMie merged commit e5a6ff2 into ember-learn:main Feb 24, 2025
6 checks passed
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.

3 participants