GraphiQL API Documentation
    Preparing search index...

    Type Alias DiagnosticSettings

    type DiagnosticSettings = {
        jsonDiagnosticSettings?: monaco.languages.json.DiagnosticsOptions;
        validateVariablesJSON?: Record<string, string[]>;
    }
    Index

    Properties

    jsonDiagnosticSettings?: monaco.languages.json.DiagnosticsOptions

    The default JSONDiagnosticOptions from monaco-editor's json mode - to use when applying variablesJSON. some examples of settings to provide here:

    • allowComments: true enables jsonc editing
    • validateSchema: 'warning'
    • trailingComments is error by default, and can be warning or ignore
    validateVariablesJSON?: Record<string, string[]>

    whilst editing operations, alongside graphql validation, generate json schema for variables to validate json schema models

    validateVariablesJSON: {
    "monaco://my-operation.graphql": ["monaco://my-variables.json"]
    }