graphqlade

    Interface GraphQLExecutionArgsParserOptions

    interface GraphQLExecutionArgsParserOptions {
        allowLegacyFragmentVariables?: boolean;
        cacheSize?: number;
        maxDepth?: number;
        maxTokens?: number;
        noLocation?: boolean;
    }

    Hierarchy

    • ParseOptions
      • GraphQLExecutionArgsParserOptions
    Index

    Properties

    allowLegacyFragmentVariables?: boolean

    will be removed in the v17.0.0

    If enabled, the parser will understand and parse variable definitions contained in a fragment definition. They'll be represented in the variableDefinitions field of the FragmentDefinitionNode.

    The syntax is identical to normal, query-defined variables. For example:

    fragment A($var: Boolean = false) on T {
    ...
    }
    cacheSize?: number
    maxDepth?: number
    maxTokens?: number

    Parser CPU and memory usage is linear to the number of tokens in a document however in extreme cases it becomes quadratic due to memory exhaustion. Parsing happens before validation so even invalid queries can burn lots of CPU time and memory. To prevent this you can set a maximum number of tokens allowed within a document.

    noLocation?: boolean

    By default, the parser creates AST nodes that know the location in the source that they correspond to. This configuration flag disables that behavior for performance or testing.

    MMNEPVFCICPMFPCPTTAAATR