Open
Description
Describe the solution you'd like
GraphQL spec allows for extension by adding fields outside of data
in the results. We can leverage this to add something like metadata
to add useful information about the query, such as the calculated complexity or telemetry data like query duration.
For example:
{
"data": { "query": { "results": [] } },
"metadata": {
"complexity": 13,
"query_duration": "78"
}
}
Additional context
The main thing that needs to be determined is how to add those fields in Absinthe. A quick look through the docs didn't reveal anything obvious, so more detailed exploration or perhaps contacting the Absinthe team may be needed to figure out a solution.