Skip to content

How to optimize django nested/related/joined queries? #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
antitoxic opened this issue Jun 6, 2016 · 2 comments
Closed

How to optimize django nested/related/joined queries? #197

antitoxic opened this issue Jun 6, 2016 · 2 comments

Comments

@antitoxic
Copy link

What is the recommended way to execute and optimized query in django that includes related objects with graphene?

article {
  categories: {
     creator: ...
  }

Graphene schema is declaritve way to get/resolve a node but how do you build an efficient query?

@mjtamlyn
Copy link
Contributor

mjtamlyn commented Jun 7, 2016

This appears to be an open problem at the moment. There's some discussion in #57, #28 and in the JS graphQL implementation in graphql/graphql-js#304.

@syrusakbary
Copy link
Member

syrusakbary commented Jun 24, 2017

There is no much progress in the planning phase related to the GraphQL execution.
Other than that, now is possible to use DataLoaders with Graphene, solving the N+1 loading problem.
http://docs.graphene-python.org/en/latest/execution/dataloader/

Closing the issue, please feel free to open a new issue (or comment here) if there is something left to be better defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants