conventions
conventions copied to clipboard
Question regarding auto-generating Graph schema & types in FE
We're using a graph-api-generator library to generate all types in the frontend. Queries always return a result -never null- and we have Angular 13 with strict typing.
When we generate the types, the outputTypes are generated as Type | null | undefined
or Type | any
.
I wonder if there is a way in backend to indicate non-null results (as in NonNull<T> for input) ? If there is, how? :)
Thanks
Do you mean something like this?
public NonNull<string> NonNullablePrimitiveField(NonNull<string> nonNullablePrimitiveArg) => /* ... */;
from test/GraphQL.Conventions.Tests/Adapters/ArgumentResolutionTests.cs
:-)