Package graphql

Class GraphQLUnusualConfiguration.ParserConfig

    • Method Detail

      • getDefaultParserOptions

        public ParserOptions getDefaultParserOptions()
        By default, the Parser will not capture ignored characters. A static holds this default value in a JVM wide basis options object.

        Significant memory savings can be made if we do NOT capture ignored characters, especially in SDL parsing.

        Returns:
        the static default JVM value
        See Also:
        IgnoredChar, SourceLocation
      • setDefaultParserOptions

        public GraphQLUnusualConfiguration.ParserConfig setDefaultParserOptions​(ParserOptions options)
        By default, the Parser will not capture ignored characters. A static holds this default value in a JVM wide basis options object.

        Significant memory savings can be made if we do NOT capture ignored characters, especially in SDL parsing. So we have set this to false by default.

        This static can be set to true to allow the behavior of version 16.x or before.

        Parameters:
        options - - the new default JVM parser options
        See Also:
        IgnoredChar, SourceLocation
      • getDefaultOperationParserOptions

        public ParserOptions getDefaultOperationParserOptions()
        By default, for operation parsing, the Parser will not capture ignored characters, and it will not capture line comments into AST elements . A static holds this default value for operation parsing in a JVM wide basis options object.
        Returns:
        the static default JVM value for operation parsing
        See Also:
        IgnoredChar, SourceLocation
      • setDefaultOperationParserOptions

        public GraphQLUnusualConfiguration.ParserConfig setDefaultOperationParserOptions​(ParserOptions options)
        By default, the Parser will not capture ignored characters or line comments. A static holds this default value in a JVM wide basis options object for operation parsing.

        This static can be set to true to allow the behavior of version 16.x or before.

        Parameters:
        options - - the new default JVM parser options for operation parsing
        See Also:
        IgnoredChar, SourceLocation
      • getDefaultSdlParserOptions

        public ParserOptions getDefaultSdlParserOptions()
        By default, for SDL parsing, the Parser will not capture ignored characters, but it will capture line comments into AST elements. The SDL default options allow unlimited tokens and whitespace, since a DOS attack vector is not commonly available via schema SDL parsing.

        A static holds this default value for SDL parsing in a JVM wide basis options object.

        Returns:
        the static default JVM value for SDL parsing
        See Also:
        IgnoredChar, SourceLocation, SchemaParser
      • setDefaultSdlParserOptions

        public GraphQLUnusualConfiguration.ParserConfig setDefaultSdlParserOptions​(ParserOptions options)
        By default, for SDL parsing, the Parser will not capture ignored characters, but it will capture line comments into AST elements . A static holds this default value for operation parsing in a JVM wide basis options object.

        This static can be set to true to allow the behavior of version 16.x or before.

        Parameters:
        options - - the new default JVM parser options for SDL parsing
        See Also:
        IgnoredChar, SourceLocation