Add specs to test GraphQL complexity for frontend queries
The backend checks the complexity of each GraphQL query, and will return an error if it's too big.
We tune that complexity algorithm on the backend. We should therefore add frontend specs for each frontend GraphQL query to ensure that the complexity does not exceed the maximum.
All .graphql
files should be tested. It's important to run these on the frontend through the Apollo library, as it sometimes adds additional fields like __typename
to the query, resulting in a higher complexity.