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

Is there anyway to apply MaxQueryDepthInstrumentation in each query in a given GraphQL request #2792

Closed
adimulam opened this issue Apr 12, 2022 · 1 comment

Comments

@adimulam
Copy link

I have a GraphQL Request with multiple queries in it (Not Batching, just different queries sent in same single request).

Currently MaxQueryDepthInstrumentation is applied on the entire GraphQL Request. But each query may have different max-depth-allowed. Is there anyway to apply MaxQueryDepthInstrumentation on each query in the request? Allow the query to resolve if it is within max-depth and if there are any queries that exceed it's max-depth, that particular query should be aborted. Hence allowing partial results (i.e, some queries resolve and some fail, but all within the same single request).

@bbakerman
Copy link
Member

Is there anyway to apply MaxQueryDepthInstrumentation in each query in a given GraphQL request

No - what you want seems pretty custom - I would copy the MaxQueryDepthInstrumentation and create your own CustomMaxQueryDepthInstrumentation

@graphql-java graphql-java locked and limited conversation to collaborators Apr 16, 2022
@bbakerman bbakerman converted this issue into discussion #2795 Apr 16, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants