File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/kotlin/graphql/kickstart/tools Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,13 @@ package graphql.kickstart.tools
33import graphql.language.Definition
44import graphql.language.Document
55import graphql.parser.Parser
6+ import graphql.parser.ParserOptions
67import graphql.schema.GraphQLScalarType
78import graphql.schema.idl.RuntimeWiring
89import graphql.schema.idl.SchemaDirectiveWiring
910import org.antlr.v4.runtime.RecognitionException
1011import org.antlr.v4.runtime.misc.ParseCancellationException
12+ import kotlin.Int.Companion.MAX_VALUE
1113import kotlin.reflect.KClass
1214
1315/* *
@@ -169,7 +171,10 @@ class SchemaParserBuilder {
169171 files.forEach { documents.add(parser.parseDocument(readFile(it), it)) }
170172
171173 if (schemaString.isNotEmpty()) {
172- documents.add(parser.parseDocument(schemaString.toString()))
174+ val options = ParserOptions
175+ .getDefaultParserOptions()
176+ .transform { o -> o.maxTokens(MAX_VALUE ) }
177+ documents.add(parser.parseDocument(schemaString.toString(), options))
173178 }
174179 } catch (pce: ParseCancellationException ) {
175180 val cause = pce.cause
You can’t perform that action at this time.
0 commit comments