Skip to content
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

Gene page GraphQL query has depth of 9 #1823

Open
joeyAghion opened this issue Oct 11, 2017 · 2 comments
Open

Gene page GraphQL query has depth of 9 #1823

joeyAghion opened this issue Oct 11, 2017 · 2 comments

Comments

@joeyAghion
Copy link
Contributor

joeyAghion commented Oct 11, 2017

Upon trying to enforce a depth limit on GraphQL queries, we noticed the /gene/... page was executing a query with depth of 9. @ashfurrow suggested this could be the source:

https://github.com/artsy/reaction/blob/eb07dfc18cf72bb17611d8c4b5230a8c74b9697d/src/Components/Gene/Contents.tsx#L371-L411

If possible, we should try to flatten this out so we can enforce a reasonable limit.

@alloy
Copy link
Contributor

alloy commented Oct 11, 2017

With a quick glance, I would think that this fragment relies on:

  • 1 gene
  • conditionally 1 page of artists related to the gene
  • 1 page of filtered artworks related to the gene

Obviously we’d need to see the full query to know it’s true impact. We can take that from the network request that’s made to MP, I can do so in a bit (on a phone right now).

@alloy
Copy link
Contributor

alloy commented Oct 11, 2017

Here’s the full query.

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

No branches or pull requests

2 participants