Convert Figma logo to code with AI

apollographql logoapollo-client-devtools

Apollo Client browser developer tools.

1,497
166
1,497
38

Top Related Projects

16,047

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)

:rocket:  A fully-featured, production ready caching GraphQL client for every UI framework and GraphQL server.

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.

5,098

✨⚡️ A feature-rich GraphQL Client for all platforms.

Quick Overview

Apollo Client DevTools is a browser extension for Chrome and Firefox that provides a suite of developer tools for debugging and inspecting Apollo Client applications. It offers features like query inspection, cache exploration, and performance monitoring, making it easier for developers to work with GraphQL and Apollo Client in their web applications.

Pros

  • Provides a visual interface for exploring and debugging Apollo Client's cache
  • Allows easy inspection and execution of GraphQL queries
  • Offers performance monitoring tools for optimizing Apollo Client applications
  • Integrates seamlessly with Chrome and Firefox developer tools

Cons

  • Limited to Chrome and Firefox browsers, not available for other browsers
  • Requires manual installation and updates
  • May impact browser performance when used extensively
  • Learning curve for developers new to Apollo Client and GraphQL

Code Examples

As Apollo Client DevTools is a browser extension and not a code library, there are no code examples to provide.

Getting Started

To get started with Apollo Client DevTools:

  1. Install the extension from the Chrome Web Store or Firefox Add-ons.
  2. Open your web application that uses Apollo Client.
  3. Open your browser's developer tools (F12 or Ctrl+Shift+I).
  4. Navigate to the "Apollo" tab in the developer tools panel.
  5. Start exploring your Apollo Client cache, queries, and performance metrics.

For more detailed instructions and documentation, visit the official Apollo Client DevTools repository.

Competitor Comparisons

16,047

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.

Pros of GraphiQL

  • More versatile and can be used with any GraphQL API, not limited to Apollo Client
  • Offers a standalone web application that can be easily integrated into various projects
  • Provides a more comprehensive set of features for exploring and testing GraphQL APIs

Cons of GraphiQL

  • Lacks specific integration with Apollo Client, which may be a drawback for Apollo-based projects
  • May require more setup and configuration compared to Apollo Client DevTools
  • Does not provide Apollo-specific features like cache inspection and query watching

Code Comparison

GraphiQL:

import { GraphiQL } from 'graphiql';
import 'graphiql/graphiql.min.css';

<GraphiQL fetcher={fetcher} />

Apollo Client DevTools:

import { ApolloDevTools } from 'apollo-client-devtools';

<ApolloProvider client={client}>
  <ApolloDevTools />
  <App />
</ApolloProvider>

Both tools serve different purposes within the GraphQL ecosystem. GraphiQL is a more general-purpose GraphQL IDE, while Apollo Client DevTools is specifically tailored for Apollo Client users. The choice between them depends on the project's requirements and the GraphQL implementation being used.

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)

Pros of GraphQL Playground

  • Standalone application that can be used with any GraphQL server
  • Supports multiple tabs for working with different queries simultaneously
  • Includes a schema explorer for easy navigation of GraphQL types and fields

Cons of GraphQL Playground

  • Less integrated with specific client-side libraries like Apollo Client
  • May require additional setup for use with certain GraphQL implementations
  • Lacks some advanced features specific to Apollo Client debugging

Code Comparison

Apollo Client DevTools:

import { ApolloClient, InMemoryCache } from '@apollo/client';

const client = new ApolloClient({
  cache: new InMemoryCache()
});

GraphQL Playground:

query {
  users {
    id
    name
  }
}

Summary

Apollo Client DevTools is specifically designed for debugging and inspecting Apollo Client applications, offering deep integration with the Apollo ecosystem. It provides features like cache inspection, query watching, and Apollo-specific performance metrics.

GraphQL Playground, on the other hand, is a more general-purpose tool that can work with any GraphQL server. It offers a user-friendly interface for exploring schemas, writing and testing queries, and viewing documentation. While it may lack some Apollo-specific features, it provides greater flexibility for use across different GraphQL implementations.

The choice between these tools often depends on the specific needs of the project and the GraphQL client being used. Developers working extensively with Apollo Client may find the DevTools more beneficial, while those working with various GraphQL servers might prefer the versatility of GraphQL Playground.

:rocket:  A fully-featured, production ready caching GraphQL client for every UI framework and GraphQL server.

Pros of apollo-client

  • Core library for Apollo Client, providing comprehensive state management and data fetching capabilities
  • Extensive documentation and community support
  • Seamless integration with various React frameworks and server-side implementations

Cons of apollo-client

  • Larger bundle size due to its comprehensive feature set
  • Steeper learning curve for beginners compared to the devtools
  • Requires additional setup and configuration for optimal use

Code Comparison

apollo-client:

import { ApolloClient, InMemoryCache } from '@apollo/client';

const client = new ApolloClient({
  uri: 'https://api.example.com/graphql',
  cache: new InMemoryCache()
});

apollo-client-devtools:

// No direct code usage; it's a browser extension
// Installation and usage are done through browser settings

Key Differences

  • Purpose: apollo-client is the core library for GraphQL state management, while apollo-client-devtools is a browser extension for debugging and inspecting Apollo Client applications
  • Usage: apollo-client is integrated directly into the application code, whereas apollo-client-devtools is used as a development tool in the browser
  • Functionality: apollo-client provides the full Apollo Client feature set, while apollo-client-devtools offers debugging and visualization capabilities for Apollo Client applications

When to Use

  • Use apollo-client when building GraphQL-powered applications with React or other supported frameworks
  • Use apollo-client-devtools during development and debugging to inspect queries, mutations, and cache state in Apollo Client applications

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.

Pros of GraphQL Engine

  • Provides a complete backend solution for GraphQL APIs, including database integration and real-time subscriptions
  • Offers automatic CRUD API generation based on database schema
  • Includes built-in authorization and authentication features

Cons of GraphQL Engine

  • Steeper learning curve due to its comprehensive feature set
  • May be overkill for smaller projects or those not requiring a full backend solution
  • Less focused on client-side development and debugging compared to Apollo Client DevTools

Code Comparison

Apollo Client DevTools (Chrome extension):

// Inspecting Apollo Client cache
apolloClient.readQuery({
  query: gql`
    query GetTodos {
      todos {
        id
        text
      }
    }
  `
});

GraphQL Engine (Hasura):

# Automatically generated CRUD API
query GetTodos {
  todos {
    id
    text
  }
}

mutation InsertTodo {
  insert_todos(objects: {text: "New todo"}) {
    returning {
      id
      text
    }
  }
}

While Apollo Client DevTools focuses on client-side cache inspection and query debugging, GraphQL Engine provides a complete backend solution with auto-generated APIs. The code examples demonstrate the difference in focus, with Apollo Client DevTools being used for inspecting client-side data, and GraphQL Engine generating server-side APIs for data manipulation.

5,098

✨⚡️ A feature-rich GraphQL Client for all platforms.

Pros of Altair

  • Standalone GraphQL client with a user-friendly interface
  • Supports multiple platforms (web, desktop, mobile)
  • Offers features like schema documentation, query history, and GraphQL subscriptions

Cons of Altair

  • Lacks deep integration with Apollo Client ecosystem
  • May require additional setup for use with Apollo-based projects
  • Does not provide specific Apollo Client debugging features

Code Comparison

Apollo Client DevTools:

import { ApolloClient, InMemoryCache } from '@apollo/client';

const client = new ApolloClient({
  cache: new InMemoryCache()
});

Altair:

import { createHttpLink } from 'apollo-link-http';
import ApolloClient from 'apollo-client';

const client = new ApolloClient({
  link: createHttpLink({ uri: '/graphql' })
});

Summary

Apollo Client DevTools is specifically designed for Apollo Client integration, offering seamless debugging and state management for Apollo-based applications. It provides a deep insight into Apollo Client's cache and queries.

Altair, on the other hand, is a more versatile GraphQL client that can work with various GraphQL implementations, not just Apollo. It offers a rich set of features for exploring and testing GraphQL APIs, making it suitable for general GraphQL development and testing.

While Apollo Client DevTools excels in Apollo-specific debugging, Altair provides a more comprehensive GraphQL exploration experience across different platforms and implementations.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Apollo Client

Apollo Client Devtools

Chrome Web Store Addons.mozilla.org Discord 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
Ben Newman@benjamn
Alessia Bellisario@alessbell
Jeff Auriemma@bignimbus
Hugh Willson@hwillson
Jerel Miller@jerelmiller
Lenz Weber-Tronic@phryneas

NPM DownloadsLast 30 Days