usebruno/bruno · error · Error

Failed to parse GraphQL variables: ${err.message}

Error message

Failed to parse GraphQL variables: ${err.message}

What it means

Error "Failed to parse GraphQL variables: ${err.message}" thrown in usebruno/bruno.

Source

Thrown at packages/bruno-cli/src/runner/run-single-request.js:370

          testResults: [],
          preRequestTestResults,
          postResponseTestResults: [],
          nextRequestName: nextRequestName,
          shouldStopRunnerExecution
        };
      }
    }

    // interpolate variables inside request
    interpolateVars(request, envVariables, runtimeVariables, processEnvVars);

    // if this is a graphql request, parse the variables, only after interpolation
    // https://github.com/usebruno/bruno/issues/884
    if (request.mode === 'graphql' && typeof request.data?.variables === 'string') {
      try {
        request.data.variables = JSON.parse(request.data.variables);
      } catch (err) {
        throw new Error(`Failed to parse GraphQL variables: ${err.message}`);
      }
    }

    if (!hasExplicitScheme(request.url)) {
      request.url = `http://${request.url}`;
    }

    if (request.settings?.encodeUrl) {
      request.url = encodeUrl(request.url);
    }

    const insecure = get(options, 'insecure', false);
    const noproxy = get(options, 'noproxy', false);
    const cachedSystemProxy = get(options, 'cachedSystemProxy', null);
    const disableCache = !get(options, 'cacheSslSession', false);
    const httpsAgentRequestFields = {};

    if (insecure) {

View on GitHub (pinned to 9bdd81c7bd)

Solutions

  1. Fix the GraphQL variables JSON syntax (quotes, commas, braces).
  2. Validate the variables block with a JSON parser before running.

When it happens

Trigger: Thrown at packages/bruno-cli/src/runner/run-single-request.js:370 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13). Data as JSON: /api/errors/71e66a6d30387eaf. Report an issue: GitHub.