Skip to content

How to select requested-only fields from DB with Ariadne GraphQL ? #1169

Answered by rafalp
kleysonr asked this question in Q&A
Discussion options

You must be logged in to vote

You have two options here:

  • look up fields in info arg
  • look up whole query contents in custom root_value callable (this is what Ariadne GraphQL Proxy does)

I vaguely remember a library existing in past for Graphene and Django that would build querysets based on query contents, but I also remember it was found very fast to be slow to work with.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kleysonr
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants