Class ParserOptions
-
- All Implemented Interfaces:
public final class ParserOptionsConfigure options for parsing GraphQL queries and schema definition language documents. Settings here override the defaults set by GraphQL Java.
-
-
Field Summary
Fields Modifier and Type Field Description private IntegermaxTokensprivate IntegermaxWhitespaceTokensprivate BooleancaptureIgnoredCharsprivate BooleancaptureLineCommentsprivate BooleancaptureSourceLocation
-
Constructor Summary
Constructors Constructor Description ParserOptions()
-
Method Summary
Modifier and Type Method Description final IntegergetMaxTokens()Modify the maximum number of tokens read to prevent processing extremely large queries final UnitsetMaxTokens(@Parameter() Integer maxTokens)Modify the maximum number of tokens read to prevent processing extremely large queries final IntegergetMaxWhitespaceTokens()Modify the maximum number of whitespace tokens read to prevent processing extremely large queries final UnitsetMaxWhitespaceTokens(@Parameter() Integer maxWhitespaceTokens)Modify the maximum number of whitespace tokens read to prevent processing extremely large queries final BooleangetCaptureIgnoredChars()Memory usage is significantly reduced by not capturing ignored characters, especially in SDL parsing. final UnitsetCaptureIgnoredChars(@Parameter() Boolean captureIgnoredChars)Memory usage is significantly reduced by not capturing ignored characters, especially in SDL parsing. final BooleangetCaptureLineComments()Single-line comments do not have any semantic meaning in GraphQL source documents and can be ignored final UnitsetCaptureLineComments(@Parameter() Boolean captureLineComments)Single-line comments do not have any semantic meaning in GraphQL source documents and can be ignored final BooleangetCaptureSourceLocation()Memory usage is reduced by not setting SourceLocations on AST nodes, especially in SDL parsing. final UnitsetCaptureSourceLocation(@Parameter() Boolean captureSourceLocation)Memory usage is reduced by not setting SourceLocations on AST nodes, especially in SDL parsing. -
-
Method Detail
-
getMaxTokens
final Integer getMaxTokens()
Modify the maximum number of tokens read to prevent processing extremely large queries
-
setMaxTokens
final Unit setMaxTokens(@Parameter() Integer maxTokens)
Modify the maximum number of tokens read to prevent processing extremely large queries
-
getMaxWhitespaceTokens
final Integer getMaxWhitespaceTokens()
Modify the maximum number of whitespace tokens read to prevent processing extremely large queries
-
setMaxWhitespaceTokens
final Unit setMaxWhitespaceTokens(@Parameter() Integer maxWhitespaceTokens)
Modify the maximum number of whitespace tokens read to prevent processing extremely large queries
-
getCaptureIgnoredChars
final Boolean getCaptureIgnoredChars()
Memory usage is significantly reduced by not capturing ignored characters, especially in SDL parsing.
-
setCaptureIgnoredChars
final Unit setCaptureIgnoredChars(@Parameter() Boolean captureIgnoredChars)
Memory usage is significantly reduced by not capturing ignored characters, especially in SDL parsing.
-
getCaptureLineComments
final Boolean getCaptureLineComments()
Single-line comments do not have any semantic meaning in GraphQL source documents and can be ignored
-
setCaptureLineComments
final Unit setCaptureLineComments(@Parameter() Boolean captureLineComments)
Single-line comments do not have any semantic meaning in GraphQL source documents and can be ignored
-
getCaptureSourceLocation
final Boolean getCaptureSourceLocation()
Memory usage is reduced by not setting SourceLocations on AST nodes, especially in SDL parsing.
-
setCaptureSourceLocation
final Unit setCaptureSourceLocation(@Parameter() Boolean captureSourceLocation)
Memory usage is reduced by not setting SourceLocations on AST nodes, especially in SDL parsing.
-
-
-
-