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

Fix issue with toString as a cache key for GraphQL input types #997

Merged

Conversation

sav007
Copy link
Contributor

@sav007 sav007 commented Jul 18, 2018

For GraphQL input types if they are involved in building cache key we were using plain .toString call.
With this commit we first serialize input type to map, resolve all variable references and sort by name, then serialize result map to json string.

Closes #977
Closes #941

For GraphQL input types if they are involved in building cache key we were using plain `.toString` call.
With this commit we first serialize input type to map, resolve all variable references and sort by name, then serialize result map to json string.

Closes apollographql#977
Closes apollographql#941
Copy link
Contributor

@digitalbuddha digitalbuddha left a comment

Choose a reason for hiding this comment

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

could you add a test with null fields as well please

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