Skip to content

How to set max tokens for Graphql Parser options? #1265

@rachana-sudhindradani

Description

@rachana-sudhindradani

I have been getting below error while trying to update to latest version.

graphql.parser.exceptions.ParseCancelledException: More than 15,000 'grammar' tokens have been presented. To prevent Denial Of Service attacks, parsing has been cancelled.
    at graphql.parser.Parser.throwIfTokenProblems (Parser.java:467)
    at graphql.parser.Parser.lambda$getSafeTokenSource$4 (Parser.java:378)
    at graphql.parser.SafeTokenSource.callbackIfMaxExceeded (SafeTokenSource.java:61)
    at graphql.parser.SafeTokenSource.nextToken (SafeTokenSource.java:53)

I am unable to set the max token value to a number above 15000.
Can you please help me with what config to be added in Maven (I do not see it in the docs)?

PS: Our Kotlin project uses Maven build tool. And we are trying to create our Graphql models in a library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions