How to open .GQL files on Windows

To open .GQL files on Windows, right-click the .gql file → Open with → choose a text/code editor (any editor that can open plain text).

Step-by-step instructions

  1. Right-click the .gql file → Open with → choose a text/code editor (any editor that can open plain text).
  2. If you want GraphQL syntax support, enable a GraphQL language plugin or language service in your editor and ensure it is configured to recognize the .gql extension.

Common issues

The file opens as plain text with no GraphQL highlighting or validation

Many editors treat .gql as generic text unless GraphQL language tooling is installed or configured to include .gql as a recognized extension.

  1. Install/enable GraphQL language tooling in your editor (GraphQL language service / plugin).
  2. Check the tool’s settings for recognized file extensions and confirm .gql is included.

Build or code generation tools ignore .gql files

Some toolchains are configured to scan only certain extensions (often .graphql) for GraphQL documents.

  1. Check your tool’s configuration for included document globs/extensions and add *.gql if needed.
  2. If the tool cannot be configured, rename the file to an extension it scans (commonly .graphql) while keeping the content unchanged.

Requests fail at runtime because the .gql document is not valid for the server schema

A .gql file can be syntactically valid GraphQL but still fail against a specific schema (missing fields, wrong arguments, or fragment type mismatches).

  1. Validate the document using schema-aware tooling (GraphQL language service / IDE integration) against the correct schema.
  2. Update the operation/fragments to match the server schema and retry.

Security note

.gql files are plain text GraphQL documents, not executables; however, they can still drive sensitive data access when used as operations against a GraphQL endpoint (e.g., accidentally committing private queries or internal fragments).

Back to .GQL extension page