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

Annotation for Specifying Non null #9

Open
cliedeman opened this issue Jan 14, 2017 · 2 comments
Open

Annotation for Specifying Non null #9

cliedeman opened this issue Jan 14, 2017 · 2 comments
Labels

Comments

@cliedeman
Copy link
Contributor

Hello,

After implementing #7 I realised there is no easy way to define non null fields on GraphQL objects.

E.g. for RelayConnection pageInfo is a Non null field and currently the only way to enforce this would be to create a type mapper to RelayConnection.

The most natural solution is probably another annotation e.g. GraphQLFieldNonNull (To avoid collision with the graphql-core non null).

There is probably merit in also making any primitives non null by default. (This solves the pageInfo difference from #7 nicely)

Thoughts?

Ciaran

@bpatters
Copy link
Owner

Correct. Non-Null is something I hadn't gotten around to finishing. Shouldn't be difficult and it'd be nice to fully implement it by:

  • Adding it for primitives
  • Allow fields to be marked non-null with the annotation to modify the schema.

@bpatters bpatters added the 2.0.0 label May 26, 2017
@cliedeman
Copy link
Contributor Author

It seems that the annotation route may not be possible

Ciaran

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

No branches or pull requests

2 participants