DEV Community

Discussion on: Entity Framework DotNet Core with GraphQL and SQL Server (using HotChocolate)

Collapse
 
michaelstaib profile image
Michael Staib

That is what pascal actually posted up there:

public class Query {
[UsePaging]
[UseSelection] // <--- creates the projections on the database
[UseSorting]
[UseFiltering]
public IQueryable GetJedis([Service]DBContext ctx)
=> ctx.Jedis.AsQueryable()

}

You put our new selections middleware on the resolver and then basically the whole subtree is selectable in one go.

Try out our preview for 10.4

You only need to declare that on the root resolver and hc will allow full selection of the whole tree.