force
force copied to clipboard
Gene page GraphQL query has depth of 9
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.
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).