Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Add extensions function to createHandler #107

Closed
bryanpyle opened this issue Aug 12, 2023 · 0 comments
Closed

Add extensions function to createHandler #107

bryanpyle opened this issue Aug 12, 2023 · 0 comments
Labels
question Further information is requested

Comments

@bryanpyle
Copy link

Story

As a server, I want to add an extensions callback function similar to what's available in the express-graphql package options
so that I can add additional key-value metadata to each response. This is useful for capturing runtime and metrics for a given request.

Acceptance criteria

  • The graphql-http createHandler function should have an optional extensions function for adding additional metadata to the GraphQL response as a key-value object. The result will be added to the "extensions" field in the resulting JSON. This is often a useful place to add development time metadata such as the runtime of a query or the amount of resources consumed. This may be an async function. The function is given one object as an argument: { document, variables, operationName, result, context }.
@graphql graphql locked and limited conversation to collaborators Aug 16, 2023
@enisdenjo enisdenjo converted this issue into discussion #109 Aug 16, 2023
@enisdenjo enisdenjo added the question Further information is requested label Aug 16, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants