99designs / 99designs/gqlgen

@semanticNonNull and semantic nullability support

Open
#3,396 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.8k
Forks
1.3k
Avg merge
2d 36m
Merged PRs (30d)
26

Description

### What happened?
Currently gqlgen does not support [@semanticNonNull](https://relay.dev/docs/guides/semantic-nullability/#proposed-solution) directive which is currently proposed as an interim solution to the [semantic nullability proposal](https://github.com/graphql/graphql-wg/discussions/1410). To support this I think gqlgen would need to:

* Handle fields marked as `@semanticNonNull` in codegen. This would mean the codegen types would disallow null values being returned from the resolvers and the runtime would prevent null propagation caused by returning errors.
* Include `@semanticNonNull` annotations in introspection.

There might be additional details needed for support but these are the ones I was able to identify.

### What did you expect?

### Minimal graphql.schema and models to reproduce

### versions
- `go run github.com/99designs/gqlgen version`?
- `go version`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.