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

Introspection and complexity #462

Open
saward opened this issue Dec 3, 2018 · 10 comments
Open

Introspection and complexity #462

saward opened this issue Dec 3, 2018 · 10 comments

Comments

@saward
Copy link

@saward saward commented Dec 3, 2018

Is it possible to specify a complexity limit that doesn't apply to schema introspection? Or to manually set the complexity cost for schema introspection?

I took a look through the generated code, but didn't see any hooks relating to this (I may very well have missed it).

@vektah

This comment has been minimized.

Copy link
Collaborator

@vektah vektah commented Dec 3, 2018

We currently strip them, what's the use case?

@saward

This comment has been minimized.

Copy link
Author

@saward saward commented Dec 3, 2018

I was having troubles with the introspection until I removed or increased the complexity limit, so I was assuming it was applying there as well. I'd prefer not to have the complexity limit apply to introspection.

If you already do that, perhaps there's some change I've made that's impacting here?

@rakete

This comment has been minimized.

Copy link

@rakete rakete commented Feb 13, 2019

I am having a similar problem, when I set a complexity limit, and reload my graphiql page, I get this error:

{
  "errors": [
    {
       "message": "operation has complexity 179, which exceeds the limit of 5"
    }
  ],
  "data": null
}

and the documentation panel in graphiql won't show my schema.

I looked in generated.go if I could find something that I could use to exclude the schema introspection from the complexity limitation, but didn't find anything.

When I remove or increase the complexity limit to >179, the above error goes away and graphiql display my schema in the documentation panel again.

@qhenkart

This comment has been minimized.

Copy link
Contributor

@qhenkart qhenkart commented Feb 25, 2019

interesting. I get the same issue except I get a constant 422 response from the server. Increasing the value like rakete suggested solved the problem

@imjm

This comment has been minimized.

Copy link

@imjm imjm commented May 28, 2019

+1, set up the query complexity, but I still want to the user can fetch the schema with low complexity value.

@stale

This comment has been minimized.

Copy link

@stale stale bot commented Aug 28, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 28, 2019
@saward

This comment has been minimized.

Copy link
Author

@saward saward commented Aug 28, 2019

I am still interested in this, so would like the issue to be kept open if that's ok.

@stale stale bot removed the stale label Aug 28, 2019
@stale

This comment has been minimized.

Copy link

@stale stale bot commented Oct 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 27, 2019
@saward

This comment has been minimized.

Copy link
Author

@saward saward commented Oct 27, 2019

Still interested

@stale stale bot removed the stale label Oct 27, 2019
@jensneuse

This comment has been minimized.

Copy link

@jensneuse jensneuse commented Dec 2, 2019

@vvakame vvakame added the pinned label Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.