-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Semantic nullability document directive #4271
Open
twof
wants to merge
31
commits into
graphql:16.x.x
Choose a base branch
from
twof:SemanticNullabilityDocumentDirective
base: 16.x.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
7ca49b2
New GraphQLSemanticNonNull type
benjie 16a2114
Handle isNonNullType
benjie 2b13389
More fixes
benjie 04a8e91
More fixes
benjie 076a735
Yet more updates
benjie c2196a0
Recognize in introspection, enable disabling null bubbling
benjie f588046
Lint fixes
benjie fa3f177
More missing pieces
benjie b5e81bd
More fixes
benjie 1f6a019
Fix schema
benjie 491f49b
Fix another test
benjie 3a91590
More minor test fixes
benjie 56db880
Fix introspection test
benjie 593ce44
Add support for * to lexer
benjie 1311906
Allow specifying errorPropagation at top level
benjie 9d706d2
Factor into getIntrospectionQuery
benjie e9f9628
Lint
benjie eb9b6c8
Prettier
benjie 3a900a9
parser tests passing
twof 557a986
Add semantic optional type
twof 95484ba
printer and parser tests passing
twof 07e4646
some new semanticNullability execution tests
twof 6fac3b5
SemanticNonNull halts null propagation
twof d11a647
SemanticOptional cleared
twof 0a8b68f
logging cleanup
twof 24474fa
rename to SemanticNullable
twof af58560
better SemanticNullable docs
twof 668f3dc
move semantic nullability tests to their own file
twof 63345de
fix git status
twof c472b9e
run prettier
twof 163785d
Add comment to parser about document directive
twof File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
These are just tests so it's not the biggest deal, but is there a better way to retrieve the node for use in error construction? This is workable, but unwieldy.
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.
Because we do not yet enable noUncheckedIndexAccess (see #3867) I think you could just index it via 0 at this point although I think what you are doing is preferred, for example
graphql-js/src/execution/subscribe.ts
Line 217 in 423e72d
Has been changed in main to your method.
You could assert that you have an executable definition or selection node instead of using typescript casting….
In fact, I think that needs to be improved in main for the example I gave!
graphql-js/src/execution/execute.ts
Line 2241 in 831c121
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.
graphql-js/src/language/predicates.ts
Line 24 in 423e72d
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.
Paid greater attention when working on twof#5 and I think the answer is that generally the tests use
expectJSON
and some other testing deduplication, added second commit there demonstrating use.