DEV Community


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

andres profile image
Andrés Pérez

I'm still looking for some resource on how to approach relationships in entity. Last time I asked they said it was a WIP :(

michaelstaib profile image
Michael Staib

That is what pascal actually posted up there:

public class Query {
[UseSelection] // <--- creates the projections on the database
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.

Forem Open with the Forem app