diff --git a/manifold-deps-parent/manifold-graphql/src/main/java/manifold/graphql/type/GqlModel.java b/manifold-deps-parent/manifold-graphql/src/main/java/manifold/graphql/type/GqlModel.java index b556fae2a..82f247571 100644 --- a/manifold-deps-parent/manifold-graphql/src/main/java/manifold/graphql/type/GqlModel.java +++ b/manifold-deps-parent/manifold-graphql/src/main/java/manifold/graphql/type/GqlModel.java @@ -32,6 +32,8 @@ import javax.tools.DiagnosticListener; import javax.tools.JavaFileObject; +import graphql.parser.ParserEnvironment; +import graphql.parser.ParserOptions; import graphql.schema.idl.TypeDefinitionRegistry; import manifold.api.fs.IFile; import manifold.api.fs.IFileFragment; @@ -127,8 +129,14 @@ private void parse() private void parse( Reader schemaInput ) throws ParseCancellationException { - Parser parser = new Parser(); - Document document = parser.parseDocument( schemaInput ); + Document document = Parser.parse( ParserEnvironment.newParserEnvironment() + .parserOptions( ParserOptions.newParserOptions() + .maxTokens( Integer.MAX_VALUE ) + .maxWhitespaceTokens( Integer.MAX_VALUE ) + .captureSourceLocation( true ) + .build() ) + .document( schemaInput ) + .build() ); buildRegistry( document ); }