.GRAPHQL 文件扩展名

GraphQL Source Code File

开发者 The GraphQL Foundation
受欢迎程度
3.0  |  1 
 

什么是 GRAPHQL 文件?

A GRAPHQL file is a plain-text file that contains instructions written in the GraphQL language, an open-source query language and server-side runtime for APIs that lets clients request the exact data they need. It may contain queries that retrieve data, mutations that change data, and subscriptions that receive updates when data changes. GRAPHQL files can also store reusable fragments and definitions that describe the types and fields available through a GraphQL service.

更多信息

在 Microsoft Visual Studio Code 1.1 中打开的 .graphql 文件截图
在 Microsoft Visual Studio Code 1.1 中打开的 GRAPHQL 文件

Developers use GRAPHQL files to define the information an application wants to retrieve from a GraphQL service, such as a user's name, email address, or list of recent posts. They commonly save GraphQL operations in GRAPHQL files to organize, reuse, and manage them as part of a software project. Keeping these operations in separate files also makes them easier to read, modify, and test without mixing them with the application's other source code.

For example, a developer is building a shopping app and wants to display a product's name, price, availability, and customer reviews. Instead of making separate requests for each piece of information, the app can send one GraphQL request specifying exactly what it needs. The GraphQL service then returns just those requested fields, and the developer can use the results to display the product page in the app.

注: The .graphql extension is a common naming convention for these files, although GraphQL does not require a specific file extension. The .gql extension (.GQL file) may also be used.

如何打开 GRAPHQL 文件

You can open GRAPHQL files with any text editor or source-code editor, such as Microsoft Visual Studio Code, Microsoft Notepad, or Apple TextEdit. Many source-code editors and development environments also provide helpful GraphQL-specific features, including syntax highlighting, validation, and code completion. GraphQL tools, such as GraphiQL, can help developers test and execute the GraphQL operations stored in these files against a GraphQL service, such as Shopify's GraphQL Admin API.

使用File Viewer Plus打开 400 多种文件格式。免费下载

可打开 GRAPHQL 文件的程序

All Platforms
Windows
操作系统自带
Mac
操作系统自带
Linux
免费
Web
免费
分类: 开发者
更新时间: 2026-09-15

验证者 FileInfo.com

FileInfo.com 团队 独立研究了本页面列出的 GraphQL Source Code 文件格式和 Mac, Windows, and Linux 应用。 我们的目标是达到 100% 的准确率,并且仅发布我们已验证过的文件类型信息。

如果您想为此页面提出新增或更新建议,请告诉我们