apollo-client-devtools

中文文档
4.26.5发布于 2026/11/03MITES Module零依赖构建来源已验证

Developer tools for Apollo Client, with Studio Explorer integration, cache inspection, and query watching.

原始使用文档
文档目录19 节
  1. Installation
  2. Chrome Web Store
  3. Firefox
  4. Install local version
  5. Features
  6. Apollo Client version support
  7. Configuration
  8. Developing
  9. Build the extension
  10. Running the sample application
  11. Development with web-ext & WebExtWebpackPlugin
  12. Tests
  13. Folder structure
  14. Debugging
  15. Testing locally
  16. Code of Conduct
  17. Who is Apollo?
  18. Learn how to build with Apollo
  19. Maintainers

Apollo Client

Apollo Client Devtools

Chrome Web Store Addons.mozilla.org Build Status

This repository contains the Apollo Client Browser Devtools extension for Chrome & Firefox.

☑️ Apollo Client User Survey
What do you like best about Apollo Client? What needs to be improved? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

Installation

Chrome Web Store

Chrome users can install the extension by visiting the Chrome Web Store.

Opera users can install the extension from Chrome Web Store using the Download Chrome Extension addon for Opera.

Firefox

Firefox users can install the addon via Firefox Browser Add-ons.

Install local version

If you want to install a local version of the extension instead, skip ahead to the Developing section.

Features

The Apollo Client Browser Devtools appear as an "Apollo" tab in your web browser inspector, alongside other tabs like "Elements" and "Console". The devtools currently have four main features:

  • Explorer: A built-in version of the Apollo Studio Explorer that allows you to make queries against your GraphQL server using your app's network interface directly (no configuration necessary).
  • Watched query inspector: View active queries, variables, cached results, and re-run individual queries.
  • Mutation inspector: View fired mutations, variables, and re-run individual mutations.
  • Cache inspector: Visualize the Apollo Client cache and search through it by field names and/or values.

Apollo Client Browser Devtools

Apollo Client version support

if you are using an older version of Apollo Client and have issues with our Client Browser Devtools we recommend you upgrade to the latest version of Apollo Client.

  • We provide active support for the current minor release of Apollo Client for use with our Client Browser DevTools.
  • We do our best to support older 3.x versions of Apollo Client for use with our Client Browser DevTools.
  • We do not offer support of 2.x versions of Apollo Client for use with our Client Browser DevTools.

Configuration

While your application is in dev mode, the devtools will appear as an "Apollo" tab in your web browser inspector. To enable the devtools for your application in production, pass connectToDevTools: true to the ApolloClient constructor in your application. Pass connectToDevTools: false if want to manually disable this functionality.

The "Apollo" tab will appear in your web browser inspector if a global window.__APOLLO_CLIENT__ object exists in your application. Apollo Client adds this hook to the window automatically unless process.env.NODE_ENV === 'production'. If you would like to use the devtools in production, manually attach your Apollo Client instance to window.__APOLLO_CLIENT__ or pass connectToDevTools: true to the constructor.

If you are seeing the "Apollo" tab but are still having issues, skip ahead to the Debugging section.

Developing

Build the extension

Before building the extension you should install dependencies:

# Install dependencies
> npm install

# (Optional) build the extension for local use
> npm run build -- --env TARGET=chrome
# or
> npm run build -- --env TARGET=firefox

# Or generate zipped distributables (already includes the above build step)
> npm run dist:chrome
# or
> npm run dist:firefox

Running the sample application

Read more.

Development with web-ext & WebExtWebpackPlugin

Read more.

Tests

We use Jest and React Testing Library to write and run our tests.

To run tests for both src and development, run the following command:

npm run test

You can also run with --watch to watch and re-run tests automatically:

npm run test:watch

Folder structure

Read more.

Debugging

Read more.

Testing locally

Read more.

Code of Conduct

This project is governed by the Apollo Code of Conduct.

Who is Apollo?

Apollo builds open-source software and a graph platform to unify GraphQL across your apps and services. We help you ship faster with:

  • Apollo Studio – A free, end-to-end platform for managing your GraphQL lifecycle. Track your GraphQL schemas in a hosted registry to create a source of truth for everything in your graph. Studio provides an IDE (Apollo Explorer) so you can explore data, collaborate on queries, observe usage, and safely make schema changes.
  • Apollo Federation – The industry-standard open architecture for building a distributed graph. Use Apollo’s gateway to compose a unified graph from multiple subgraphs, determine a query plan, and route requests across your services.
  • Apollo Client – The most popular GraphQL client for the web. Apollo also builds and maintains Apollo iOS and Apollo Kotlin.
  • Apollo Server – A production-ready JavaScript GraphQL server that connects to any microservice, API, or database. Compatible with all popular JavaScript frameworks and deployable in serverless environments.

Learn how to build with Apollo

Check out the Odyssey learning platform, the perfect place to start your GraphQL journey with videos and interactive code challenges. Join the Apollo Community to interact with and get technical help from the GraphQL community.

Maintainers

NameUsername
Jeff Auriemma@bignimbus
Jerel Miller@jerelmiller
Lenz Weber-Tronic@phryneas

版本与发布记录

apollo-client-devtools 共发布 151 个版本,首次发布于 2019/01/24;过去 12 个月发布了 31 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
4.26.5latest2026/11/03今天
4.26.42026/10/2014 天前
4.26.32026/10/0628 天前
4.26.22026/09/121 个月前
4.26.12026/09/041 个月前
4.26.02026/06/304 个月前

其他发布通道:alpha → 2.1.7-alpha.2。

关于 apollo-client-devtools 的常见问题

apollo-client-devtools 是什么?

用于Apollo Client的开发人员工具,具有Studio Explorer集成、缓存检查和查询监视。

如何安装 apollo-client-devtools?

在项目目录运行 npm install apollo-client-devtools,或使用 pnpm add / yarn add / bun add。

apollo-client-devtools 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/apollo-client-devtools 是否存在。

apollo-client-devtools 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

apollo-client-devtools 可以商用吗?

apollo-client-devtools 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

apollo-client-devtools 还在维护吗?

最新版本 4.26.5 发布于 2026/11/03(今天);至今共发布 151 个版本,其中过去 12 个月发布了 31 个;首次发布于 2019/01/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。