Skip to content

Large schema file causes ParseCancelledException again #716

Closed
@nnrudakov

Description

@nnrudakov

The same error as in #601 , but in different place.

Description

Failed to instantiate [graphql.kickstart.tools.SchemaParser]: Factory method 'schemaParser' threw exception; nested exception is graphql.parser.ParseCancelledException: Invalid Syntax : More than 15000 grammar tokens have been presented. To prevent Denial Of Service attacks, parsing has been cancelled

Expected behavior

Large schema files should be parsed without error.

Actual behavior

ParseCancelledException (see above)

Steps to reproduce the bug

Load large file:

SchemaParser.newParser()
            .file("schema.graphqls")
            .build()

Fail happens in this row https://github.com/graphql-java-kickstart/graphql-java-tools/blob/master/src/main/kotlin/graphql/kickstart/tools/SchemaParserBuilder.kt#L171

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions