Skip to content

Add description & example of how to handle multiple parameters in read() when declaring typePolicies. #6755

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

Merged
merged 2 commits into from
May 5, 2022

Conversation

Moristotle
Copy link
Contributor

@Moristotle Moristotle commented Aug 1, 2020

The official documentation lacked an example and description of how to handle multiple parameters within the read() function when defining typePolicies.
The proposed change addresses that by both showcasing that it is possible to handle multiple parameters and how to do so (using a syntax that was previously undocumented).

I struggled for a while when it came to understanding how to handle this use case, so I am more than happy to share my findings while improving the docs with the hope of helping others that might find themselves in the same situation. 😃

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@apollo-cla
Copy link

@Moristotle: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

Copy link
Contributor

@jpvajda jpvajda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution this is definitely a helpful example for this case! 🚀

@jpvajda
Copy link
Contributor

jpvajda commented May 5, 2022

The check for bundlesize is stuck, so I'm inquiring with the team what I'd need to do to re-run this check.

@jpvajda jpvajda self-assigned this May 5, 2022
The official documentation lacked an example and description of how to
handle multiple parameters within the read() function when defining
typePolicies. The proposed change addresses that by both showcasing that
it is possible to handle multiple parameters and how to do so (using a
syntax that was previously undocumented).

I struggled for a while when it came to understanding how to handle this
use case, so I am more than happy to share my findings while improving
the docs with the hope of helping others that might find themselves in
the same situation. 😃
@benjamn benjamn changed the base branch from master to main May 5, 2022 21:46
@benjamn benjamn merged commit 00d6e20 into apollographql:main May 5, 2022
@benjamn
Copy link
Member

benjamn commented May 5, 2022

Thanks @Moristotle, and sorry for the wait!

@Moristotle
Copy link
Contributor Author

No worries, happy to contribute!
@jpvajda @benjamn

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants