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
{{ message }}
Repository navigation
Exception even when not using [UseSelection] on field that returns a record type #8486
services.AddGraphQLServer().AddTypes().AddPagingArguments().AddSorting().AddQueryContext().AddFiltering();// omitted for brevity[QueryType]publicstaticclassQuery{[UsePaging][UseFiltering][UseSorting]publicstaticasyncTask<Connection<User>>GetUsers(PagingArgumentspaging,QueryContext<User>query){returnConnection.Empty<User>();}}publicrecordUser(UserIdId,FirstNameFirstName,LastNameLastName,PhoneNumberPhoneNumber);
Steps to reproduce
Add a query field that returns a record type.
Use [UseFiltering] on that field.
Enable QueryContext<T> and filtering using .AddQueryContext() and AddFiltering()
Run a query selecting your field.
What is expected?
No exception. A QueryContext<T> with a nullSelector since we didn't use [UseSelection] on the field.
What is actually happening?
The same exception reported in #6487, even though the OP there is using [UseSelection] and I'm not. When you don't use [UseSelection], the expression-building code that causes this exception shouldn't even be executed; that's the expectation. This what distinguishes this issue from #6487.
Activity