You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
non-nullable arguments are being inferred as nullable
Given the following class
public class Query
{
public Task<User> GetUser(IResolverContext ctx, int id)
{
IUserRepository repo = ctx.Service<IUserRepository>();
return repo.GetAsync(id);
}
}
results in the following
user(
id: Int = null
): User
Expected behavior
user(
id: Int!
): User
Additional context
The only way for me to specify that id should be non nullable is to override the field descriptor.Field(f => f.GetUser(default, default)).Argument("id",d => d.Type<NonNullType<IntType>>());
The text was updated successfully, but these errors were encountered:
I will look into that. We have recently added a lot functionality in that area so it might be a regression bug. I will write a test for that and check it out. A fix should be ready Sunday night. Thanks for reporting this issue.
Problem
non-nullable arguments are being inferred as nullable
Given the following class
results in the following
Expected behavior
Additional context
The only way for me to specify that id should be non nullable is to override the field
descriptor.Field(f => f.GetUser(default, default)).Argument("id",d => d.Type<NonNullType<IntType>>());
The text was updated successfully, but these errors were encountered: