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

Feat: Add metadata in results (e.g. complexity, telemetry) #38

Open
frankdugan3 opened this issue Sep 14, 2022 · 0 comments
Open

Feat: Add metadata in results (e.g. complexity, telemetry) #38

frankdugan3 opened this issue Sep 14, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@frankdugan3
Copy link
Contributor

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.

@frankdugan3 frankdugan3 added the enhancement New feature or request label Sep 14, 2022
@zachdaniel zachdaniel added the good first issue Good for newcomers label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants