[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"extension:v3:en:graphql":3},{"resolvedFromAlias":4,"canonicalExt":5,"ext":5,"name":6,"category":7,"categoryName":8,"updatedAt":9,"indexable":10,"popularity":11,"summary":12,"howToOs":13,"quickAnswer":19,"answerIntro":20,"whatIs":21,"description":22,"furtherReading":23,"otherMeanings":39,"unverifiedMeaning":4,"openInstructions":40,"recommendedSoftware":54,"commonIssues":55,"securityNotes":74,"faq":78,"aliases":91,"mimeTypes":93,"relatedExtensions":95,"breadcrumbs":143,"categoryAnchor":153,"categoryFuturePath":154,"metaDescription":155,"availableHowToOs":156,"openOnDeviceLinks":157,"cannotOpenReasons":173,"cannotOpenFixes":174,"convertOptions":175,"securityAffiliateMessaging":176,"securityAffiliates":177,"repairAffiliates":178,"recoveryAffiliates":179,"editAffiliates":180},false,"graphql","GraphQL Schema/Query Document (SDL)","code","Code","2026-06-12T09:09:47.110Z",true,55,".graphql files are plain-text GraphQL documents commonly used to store GraphQL schema definitions (SDL) and sometimes operations (queries/mutations). They open in code editors and IDEs with GraphQL language support.",[14,15,16,17,18],"windows","mac","linux","ios","android","To open .GRAPHQL files on Windows, right-click the .graphql file and choose “Open with” → Visual Studio Code (or another code editor).","To open a .graphql file, use a text editor or IDE (for example, Visual Studio Code with a GraphQL extension) because it’s plain text. If you want syntax highlighting and validation, install a GraphQL language plugin rather than using a basic viewer.","A .graphql file is typically a UTF-8 plain-text file containing GraphQL language text, often the Schema Definition Language (SDL) used to define types, fields, and directives. The GraphQL specification defines the grammar and syntax used in these documents, which are commonly used in GraphQL servers and tooling.","When GraphQL content is transported over HTTP, media types are relevant; the GraphQL-over-HTTP draft defines related media types for responses. However, the file extension itself is primarily a developer convention for storing GraphQL documents on disk rather than a container format with a complex binary structure.",[24,27,30,33,36],{"title":25,"url":26},"GraphQL Specification (graphql/graphql-spec)","https://github.com/graphql/graphql-spec",{"title":28,"url":29},"GraphQL — Wikipedia (overview and SDL context)","https://en.wikipedia.org/wiki/GraphQL",{"title":31,"url":32},"GraphQL over HTTP (Draft) — Media Types","https://graphql.github.io/graphql-over-http/draft/",{"title":34,"url":35},"Apollo GraphQL (VS Code extension)","https://marketplace.visualstudio.com/itemdetails?itemName=apollographql.vscode-apollo",{"title":37,"url":38},"IANA — Media Types (authoritative registry)","https://www.iana.org/assignments/media-types",[],{"windows":41,"macos":44,"linux":47,"ios":50,"android":52},[42,43],"Right-click the .graphql file and choose “Open with” → Visual Studio Code (or another code editor).","In VS Code, install a GraphQL extension such as “GraphQL: Language Feature Support” or “Apollo GraphQL” to get syntax highlighting and validation.",[45,46],"Open the file in a code editor (for example, Visual Studio Code) since .graphql is plain text.","Add GraphQL language tooling in the editor (for example, VS Code GraphQL extensions) for highlighting and linting.",[48,49],"Open the file with a code editor (for example, Visual Studio Code or a desktop text editor) because it’s plain text.","Enable GraphQL support in the editor (for example, VS Code GraphQL extensions) to validate schema and operations.",[51],"Open the file in a text/code editor app that can display plain text; for full GraphQL tooling, transfer the file to a desktop editor.",[53],"Open the file in a text/code editor app that can display plain text; for schema validation and language features, use a desktop editor with GraphQL tooling.",{},[56,62,68],{"title":57,"description":58,"steps":59},"Opens as plain text with no syntax highlighting","Some editors don’t recognize .graphql automatically or don’t include GraphQL language features by default, so the file looks like uncolored text and errors aren’t flagged.",[60,61],"Install a GraphQL language extension in your editor (for example, “GraphQL: Language Feature Support” or “Apollo GraphQL” for VS Code).","If your editor supports it, associate the .graphql extension with the GraphQL language mode.",{"title":63,"description":64,"steps":65},"Schema or query shows parse/validation errors","GraphQL documents must follow the grammar defined by the GraphQL specification; missing braces, invalid names, or incorrect SDL structure can cause tooling to report syntax errors.",[66,67],"Check the file against the GraphQL specification’s definition of the language and SDL and fix syntax issues (for example, unmatched braces or invalid type definitions).","If you are editing multiple schema files, ensure your tooling is loading all relevant .graphql files so referenced types/directives are known.",{"title":69,"description":70,"steps":71},"Editor tooling complains about missing project configuration","Some GraphQL editor extensions rely on project context (schema location, endpoint, or file discovery) to provide validation and autocomplete; without that context, features may be limited or error-prone.",[72,73],"Configure your GraphQL extension according to its documentation so it can locate the schema and operations in your project.","If you use both schema and operations, keep them in consistent locations and ensure the extension is set to scan those paths.",[75,76,77],".graphql files are typically plain text and do not inherently contain executable code, but be cautious with GraphQL tooling that automatically loads schemas or fetches metadata from endpoints—opening an untrusted project may trigger network requests depending on your editor extension settings.","Treat .graphql files from untrusted sources as untrusted input to parsers and language servers; malformed documents can trigger bugs or heavy CPU usage in tooling that parses/validates GraphQL syntax.","If a .graphql file is part of a larger codebase, review any related configuration and scripts used by GraphQL tooling (for example, build steps that process schema files) before running them.",[79,82,85,88],{"question":80,"answer":81},"Is a .graphql file just text?","Yes. It typically contains GraphQL language text—often Schema Definition Language (SDL)—as defined by the GraphQL specification.",{"question":83,"answer":84},"What’s the difference between a GraphQL schema file and a GraphQL query file?","Both can be stored as .graphql. Schema files usually contain SDL (type definitions and schema declarations), while query documents contain operations (queries/mutations) and fragments.",{"question":86,"answer":87},"Does .graphql have an official IANA-registered MIME type?","This answer should be verified against the IANA media type registry; GraphQL-related media types are discussed in the GraphQL-over-HTTP draft for HTTP usage, but file extensions and MIME types are not always a one-to-one mapping.",{"question":89,"answer":90},"What editor support is available for .graphql in VS Code?","VS Code has GraphQL-focused extensions that provide language features such as syntax highlighting and tooling support, including “GraphQL: Language Feature Support” and “Apollo GraphQL”.",[92],"gql",[94],"application/graphql-response+json",[96,102,107,113,119,125,131,137],{"ext":97,"name":98,"category":7,"categoryName":8,"popularity":99,"summary":100,"howToOs":101},"php","PHP script (PHP source code)",85,".php files typically contain PHP source code used on web servers to generate dynamic web pages and API responses. You can open them in a code editor, but they are usually executed by a web server (often via PHP-FPM) rather than “run” like a normal desktop app.",[14,15,16,17,18],{"ext":103,"name":104,"category":7,"categoryName":8,"popularity":99,"summary":105,"howToOs":106},"sql","SQL script (Structured Query Language)",".sql files contain SQL statements (queries, schema definitions, and data changes) that can be run by a database tool or opened as plain text for review and editing.",[14,15,16,17,18],{"ext":108,"name":109,"category":7,"categoryName":8,"popularity":110,"summary":111,"howToOs":112},"cs","C# source code file",80,".cs files contain C# source code used to build .NET applications and libraries. They are plain-text files typically edited in code editors and IDEs such as Visual Studio Code with C# tooling.",[14,15,16,17,18],{"ext":114,"name":115,"category":7,"categoryName":8,"popularity":116,"summary":117,"howToOs":118},"go","Go source file",78,".go files contain source code written in the Go (Golang) programming language. You can open them in code editors (for reading/editing) or build/run them with the Go toolchain.",[14,15,16,17,18],{"ext":120,"name":121,"category":7,"categoryName":8,"popularity":122,"summary":123,"howToOs":124},"tsx","TypeScript JSX (TSX) source file",75,".tsx is a TypeScript source code file that contains JSX syntax, commonly used with React-style UI components. You open it in a code editor (for viewing/editing) and build it with TypeScript tooling (for running in apps).",[14,15,16,17,18],{"ext":126,"name":127,"category":7,"categoryName":8,"popularity":128,"summary":129,"howToOs":130},"kt","Kotlin source file",72,".kt files contain Kotlin source code used to build Kotlin applications (including Android apps) and libraries. You typically open them in a code editor or IDE such as IntelliJ IDEA or Android Studio.",[14,15,16,17,18],{"ext":132,"name":133,"category":7,"categoryName":8,"popularity":134,"summary":135,"howToOs":136},"swift","Swift Source Code",70,".swift is a Swift programming language source file used to write apps and other software. You open it in code editors and IDEs such as Xcode or other text/code editors.",[14,15,16,17,18],{"ext":138,"name":139,"category":7,"categoryName":8,"popularity":140,"summary":141,"howToOs":142},"dart","Dart source code",65,".dart files contain source code written in the Dart programming language. You open them in a code editor/IDE or work with them using the Dart SDK tools.",[14,15,16,17,18],[144,147,150],{"label":145,"to":146},"Home","/",{"label":148,"to":149},"File Extension Index","/file-extension",{"label":151,"to":152},".GRAPHQL","/file-extension/graphql","category-code","/category/code","Learn what .GRAPHQL files are, how to open them on every platform, common fixes, and security best practices.",[14,15,16,17,18],[158,161,164,167,170],{"os":14,"label":159,"to":160},"Open .GRAPHQL on Windows","/how-to/open-graphql-on-windows",{"os":15,"label":162,"to":163},"Open .GRAPHQL on Mac","/how-to/open-graphql-on-mac",{"os":16,"label":165,"to":166},"Open .GRAPHQL on Linux","/how-to/open-graphql-on-linux",{"os":17,"label":168,"to":169},"Open .GRAPHQL on iOS","/how-to/open-graphql-on-ios",{"os":18,"label":171,"to":172},"Open .GRAPHQL on Android","/how-to/open-graphql-on-android",[57,63,69],[60,61],[],"code_runtime",[],[],[],[]]