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

Is NonNullType still necessary when nullable reference types is enabled? #42

Open
gojanpaolo opened this issue Jan 21, 2021 · 0 comments

Comments

@gojanpaolo
Copy link
Contributor

Session # 2 demonstrates how HC leverages C#'s nullable reference types.
In Session # 6 NonNullType is used...

.ResolveWith<TrackResolvers>(t => t.GetSessionsAsync(default!, default!, default))
.UsePaging<NonNullType<SessionType>>()

...but it looks like it doesn't affect the generated schema at all.

The graphql type nullability is controlled by nullable reference types:

  • Task<IEnumerable<Session>> GetSessionsAsync for non-nullable Session
  • Task<IEnumerable<Session?>> GetSessionsAsync for nullable Sessions

Is it ok to remove the use of NonNullType if nullable reference types is enabled?

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

No branches or pull requests

1 participant