Allow our GraphQL API to recommend complexity values for fields
When given a certain flag (perhaps an ENV flag) it would be great if our GraphQL API could recommend the complexity value for fields. This would take the arbitrariness of determining complexity values and ensure they are all in line with each other.
This would be based on measuring things like, per field:
- the number of PostgreSQL queries
- the number of Gitaly calls
- the memory consumption of the resolved object
- time taken to resolve
It would be ideal if this could be run against an environment with a lot of data like production, however, at the very least for it to be run locally by a developer with instructions on how to generate complete data to test against first.
Edited by Luke Duncalfe