Propose single wrapping type#4339
Merged
JoviDeCroock merged 1 commit intosemantic-nullability-rfc-implementationfrom Feb 5, 2025
Merged
Propose single wrapping type#4339JoviDeCroock merged 1 commit intosemantic-nullability-rfc-implementationfrom
JoviDeCroock merged 1 commit intosemantic-nullability-rfc-implementationfrom
Conversation
|
Hi @JoviDeCroock, I'm @github-actions bot happy to help you with this PR 👋 Supported commandsPlease post this commands in separate comments and only one per comment:
|
twof
approved these changes
Feb 5, 2025
Contributor
twof
left a comment
There was a problem hiding this comment.
I think this works, and I definitely prefer this over having two types. Go ahead an merge it into your other branch, and I'll give you a more thorough review of that one tomorrow.
Contributor
Author
|
@twof my main "desire" would be to only introduce new syntax for the new type as well but I feel that is a more sensitive matter at this moment in time so I'll leave it at that and merge the descriptions as well |
869ca46
into
semantic-nullability-rfc-implementation
24 of 28 checks passed
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.
This reduces the new AST-nodes to only be for the newly introduced type, this does make it so that when we invoke
printwe have to rely on the user to either specify that we're in semantic nullability mode or we could do a pre-traverse and when we enter a node with semantic-non-null we toggle it on ourselves.The main reasoning behind removing the new name for our existing null type is that I would prefer to be backwards compatible in terms of schema structure. This because it might become complex for people to reason about composed schemas, i.e. a lot of individually parsed schemas that later on compose into a larger one.
I know that technically this is covered because in the classic ones we'll have the non wrapped null type and in the modern ones we'll have the semantic nullable wrapped type. For schema-builders like pothos and others I think this is rather complex to reason about and to supply us with. I would instead choose to absorb this complexity in the feature and stay backwards compatible.
This also sets us up for the SDL not being a breaking change, we only add one AST-type, what's left now is to settle on a semantic non-null syntax and making everything backwards compatible.