Support for IQueryable backend
See original GitHub issueIs your feature request related to a problem? Please describe. My GraphQL backend database is an SQL database, and I’d like to consolidate queries as much as possible. Right now I can batch multiple queries into one using DataLoaders, but ideally I’d like to fetch as much of the graph as possible (ideally the whole thing) using single query with multiple join statements (essentially what graphql-net project does).
Describe the solution you’d like
Hot chocolate resolves graph one leve at a time, which is an idea deeply rooted into ExecutionStrategyBase
class, which is something core enough to the concept that it seems it cannot be easily replaced or tampered with.
I think there’d have to be execution strategies which are different depending on the approach you want to take: fetch a level at a time or build IQueryable
instances that’ll fetch the whole thing at once. In the latter approach, I’d say the resolvers instead of providing the objects wold have gradualy build up the IQueryables that then fetch the data which is in turn processed again by a 2nd batch of resolvers which do post-processing, as data fetched from DB might not correspond 1 to 1 with graphql query in some cases.
Describe alternatives you’ve considered The alternative of simply using graphql-net is not feisable for me because I’m on .NET Core, which that library does not support. The most viable alternative right now is to stick to data loader approach.
Additional context Add any other context or screenshots about the feature request here.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:14 (7 by maintainers)
Top GitHub Comments
Actually I’ll close this issue for now, if somebody ever needs an IQueryable backend I guess they can open another one.
Hi @michaelstaib - thanks for the update. This feature would be interesting, however, I do not really need it right now. Sorry 😉