Unwrap non-null types#20
Merged
jneurock merged 2 commits intokloeckner-i:masterfrom Jun 19, 2019
Merged
Conversation
We ran into the following error when we had a non-null `edges` field in
our schema (with a non-null type within the collection):
Cannot read property 'cursor' of undefined
This patch adds a similar non-null `edges` field to the schema and adds
code to unwrap non-null types when inferring the type of a selection.
96aab5e to
29905db
Compare
Contributor
Author
|
Looks like CI is failing because the coverage report isn’t being generated: |
73275c2 to
cede4a8
Compare
Contributor
|
Hey! Thanks for the contribution. It looks like the coverage issues were an issue with Travis. |
Contributor
Author
|
Awesome. Thanks @jneurock! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We ran into the following error due to having non-null
edgesfields in our schema:And a similar issue with non-null mutation return types:
This PR adds examples of non-null
edgesand non-null mutation return types to the schema and the accompanying logic to unwrap non-null types as required.We deliberately modified only one of the two occurrences of
edgesto ensure it continues to work both ways.We’ve been slightly lazy an amended the single existing mutation rather than adding a second mutation to test against. Happy to add an explicit mutation example if needsbe.