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

Implement query complexity analysis #324 #401

Closed
wants to merge 2 commits into from

Conversation

ne0h12
Copy link

@ne0h12 ne0h12 commented Jun 26, 2020

@ne0h12
Copy link
Author

ne0h12 commented Sep 2, 2020

@pavelnikolov can you review my PR, please?

graphql.go Outdated Show resolved Hide resolved
@pavelnikolov
Copy link
Member

Hi, @ne0h12
Sorry for the late reply on this PR. Thank you for your effort but I don't feel that the complexity implementation should look like this. Instead after merging #560, I would like it to be possible for users to define their own @complexity directive on FIELD_DEFINITION and ARGUMENT_DEFINITION. This way each user can assign custom complexity and calculate it based on their needs. This library should not impose a particular solution. Instead it should be extendable and allow the users to define this behavior themselves.

@pavelnikolov pavelnikolov added this to the v1.7.0 milestone Mar 2, 2023
return newSels
}

func (e RecursionEstimator) doRecursivelyVisitSelections(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this different than the normal MaxDepth check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants