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

[WIP] Experimental support for semantic-non-null #4192

Draft
wants to merge 18 commits into
base: 16.x.x
Choose a base branch
from

Conversation

benjie
Copy link
Member

@benjie benjie commented Sep 14, 2024

DISCLAIMER: I'm very jetlagged right now, and it's late. This is almost certainly full of issues.

The main aim of this PR is so we can start experimenting with both semantic non-null and disabling error bubbling.

Semantic non-null has been added using the asterisk (Int*) syntax, because that was easiest (and I'm doing this from an airport lounge whilst I wait for boarding...). I know this isn't what we've most recently discussed, but it's a smaller lift and means we can start experimenting.

To disable error bubbling, pass errorPropagation: false as part of the execution args: graphql({ schema, source, errorPropagation: false }).

To see the full types, pass nullability: 'FULL' to getIntrospectionQuery, e.g. getIntrospectionQuery({ nullability: 'FULL' }). (I don't like this current enum, but it'll do for now.)

Note: this implementation does NOT align with my previous thoughts exactly, and it is definitely not final.

TODO:

  • Address TODO comments, most notably the memoization ones
  • If asterisk is disliked (which it certainly was... but what we were proposing then was slightly different), add document directives and change syntax to !! or whatever
  • Finalize naming
  • Add reasonable descriptions to introspection
  • Add lots of tests
  • Everything else
  • Reflect in spec

@benjie benjie closed this Sep 14, 2024
@benjie benjie reopened this Sep 14, 2024
@benjie
Copy link
Member Author

benjie commented Sep 14, 2024

@github-actions publish-pr-on-npm

@benjie
Copy link
Member Author

benjie commented Sep 14, 2024

Boarding was just called... So that's it for now!

@benjie
Copy link
Member Author

benjie commented Sep 14, 2024

@JoviDeCroock If you have a moment, looks like https://github.blog/changelog/2024-02-13-deprecation-notice-v1-and-v2-of-the-artifact-actions/ is causing us issues. I tried updating them but CI is still failing, I think maybe my fixes to .github need to be merged into 16.x.x first and then this might run?

@JoviDeCroock
Copy link
Member

JoviDeCroock commented Sep 14, 2024

@benjie #4193 should have you covered - yes the trunk branch will dictate the actions used I think

@benjie

This comment has been minimized.

Copy link

@github-actions publish-pr-on-npm

@benjie The latest changes of this PR are available on NPM as
graphql@16.9.0-canary.pr.4192.1813397076f44a55e5798478e7321db9877de97a
Note: no gurantees provided so please use your own discretion.

Also you can depend on latest version built from this PR:
npm install --save graphql@canary-pr-4192

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

Successfully merging this pull request may close these issues.

3 participants