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

[TT-8663] Improve GraphQL "depth limit exceeded" error message #3276

Open
furkansenharputlu opened this issue Aug 17, 2020 · 1 comment
Open
Labels
enhancement graphql needed for graphql project

Comments

@furkansenharputlu
Copy link
Contributor

furkansenharputlu commented Aug 17, 2020

As a user, I want to see max depth limit and current depth limit info too when I get a depth limit exceed, so that I can understand what I am doing wrong easily.

Acceptance Criteria

  • Discuss with the squad that whether it is a security issue
  • The response should show the current depth and the max depth limit

Details

It is a customer request from webinar: https://www.youtube.com/watch?v=9nF_piFQ-D8

Instead of this:

{
    "error": "depth limit exceeded"
}

Better this:

{
    "error": "query depth limit exceeded - current: 3 > max: 2"
}

My comment: This is not a security thing. An attacker still can learn what is the depth limit value in 2 seconds. The point is to help users to use the API easily.

@lghiur
Copy link
Member

lghiur commented Aug 17, 2020

Nice one Furkan!

@furkansenharputlu furkansenharputlu changed the title Improve GraphQL "depth limit exceeded" error message [Story] Improve GraphQL "depth limit exceeded" error message Aug 17, 2020
@agata-wit agata-wit added the graphql needed for graphql project label Oct 8, 2021
@agata-wit agata-wit changed the title [Story] Improve GraphQL "depth limit exceeded" error message [TT-8663] Improve GraphQL "depth limit exceeded" error message Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement graphql needed for graphql project
Projects
None yet
Development

No branches or pull requests

3 participants