Skip to content

Specify nullness for nodes in the graphql.language package #3899

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mk868
Copy link

@mk868 mk868 commented Apr 6, 2025

Related: #3878

I applied @NullMarked and @Nullable annotations to these classes:

  • graphql.language.Node - partially annotated with @Nullable
  • graphql.language.AbstractNode
  • graphql.language.ArrayValue
  • graphql.language.BooleanValue
  • graphql.language.EnumValue
  • graphql.language.FloatValue
  • graphql.language.IntValue
  • graphql.language.NullValue
  • graphql.language.ObjectValue
  • graphql.language.ScalarValue
  • graphql.language.StringValue - I was not sure about the nullability of value, for now I marked it @Nullable.
  • graphql.language.Value
  • graphql.language.VariableReference

Notes

  • SourceLocation sourceLocation - can contain a null value in all places

Potential problems (will be pointed by #3852 )

  • EnumValue.Builder#build() can build an EnumValue object with a null name
  • FloatValue.Builder#build() can build an FloatValue object with a null value
  • IntValue.Builder#build() can build an IntValue object with a null value
  • VariableReference.Builder#build() can build an VariableReference object with a null name

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.

2 participants