// Using this throws: "extensions": { // "message": "Value cannot be null. (Parameter 'source')", // "stackTrace": " at System.Linq.Queryable.Select[TSource,TResult](IQueryable`1 source, Expression`1 selector)\r\n at HotChocolate.Types.Selections.SelectionMiddleware`1.InvokeAsync(IMiddlewareContext context)\r\n at HotChocolate.Execution.ExecutionStrategyBase.ExecuteMiddlewareAsync(ResolverContext resolverContext, IErrorHandler errorHandler)" // } // Reomving it I can query for the studen properties, but not get courses public async Task <Student> OnNewStudent([EventMessage] int studentId, [Service] Context context) { return(await context.Students.FindAsync(studentId)); }
public IQueryable <Student> GetStudents([Service] Context context) => context.Students;