Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

graphql-voyager

> 后端框架
Open source

️ Represent any GraphQL API as an interactive graph

8.2K stars0 likes2 views
WebsiteGitHub

About

️ Represent any GraphQL API as an interactive graph

GraphQL Voyager

Represent any GraphQL API as an interactive graph. It's time to finally see the graph behind GraphQL. You can also explore number of public GraphQL APIs from our list.

With graphql-voyager you can visually explore your GraphQL API as an interactive graph. This is a great tool when designing or discussing your data model. It includes multiple example GraphQL schemas and also allows you to connect it to your own GraphQL endpoint. What are you waiting for, explore your API!

GraphQL Weekly #42

Live Demo

Features

  • Quick navigation on graph
  • Left panel which provides more detailed information about every type
  • "Skip Relay" option that simplifies graph by removing Relay wrapper classes
  • Ability to choose any type to be a root of the graph

API

GraphQL Voyager exports Voyager React component and helper init function. If used without module system it is exported as GraphQLVoyager global variable.

Properties

Voyager component accepts the following properties:

  • introspection [object] - the server introspection response. If function is provided GraphQL Voyager will pass introspection query as a first function parameter. Function should return Promise which resolves to introspection response object.
  • displayOptions (optional)
    • displayOptions.skipRelay [boolean, default true] - skip relay-related entities
    • displayOptions.skipDeprecated [boolean, default true] - skip deprecated fields and entities that contain only deprecated fields.
    • displayOptions.rootType [string] - name of the type to be used as a root
    • displayOptions.sortByAlphabet [boolean, default false] - sort fields on graph by alphabet
    • displayOptions.showLeafFields [boolean, default true] - show all scalars and enums
    • displayOptions.hideRoot [boolean, default false] - hide the root type
  • allowToChangeSchema [boolean, default false] - allow users to change schema
  • hideDocs [boolean, default false] - hide the docs sidebar
  • hideSettings [boolean, default false] - hide settings panel
  • hideVoyagerLogo [boolean, default true] - hide voyager logo

Using pre-bundled version

You can get GraphQL Voyager bundle from the following places:

    • some exact version - https://cdn.jsdelivr.net/npm/[email protected]/dist/voyager.standalone.js
    • latest version - https://cdn.jsdelivr.net/npm/graphql-voyager/dist/voyager.standalone.js
  • from dist folder of the npm package graphql-voyager

Note: voyager.standalone.js is bundled with react, so you just need to call renderVoyager function that's it.

HTML example

Using as a dependency

Build for the web with webpack, or any other bundle.

Webpack example

Middleware

GraphQL Voyager has middleware for the next frameworks:

Properties

Middleware supports the following properties:

  • endpointUrl [string] - the GraphQL endpoint url.
  • displayOptions [object] - same as here
  • headersJS [string, default "{}"] - object of headers serialized in string to be used on endpoint url
    Note: You can also use any JS expression which results in an object with header names as keys and strings as values e.g. { Authorization: localStorage['Meteor.loginToken'] }

Express

javascript
import express from 'express';
import { express as voyagerMiddleware } from 'graphql-voyager/middleware';

const app = express();

app.use('/voyager', voyagerMiddleware({ endpointUrl: '/graphql' }));

app.listen(3001);

Hapi

Version 20+

javascript
import Hapi from '@hapi/hapi';
import { hapi as voyagerMiddleware } from 'graphql-voyager/middleware';

const server = new Hapi.Server({
  port: 3001,
});

const init = async () => {
  await server.register({
    plugin: voyagerMiddleware,
    options: {
      path: '/voyager',
      endpointUrl: '/graphql',
    },
  });

  await server.start();
};

init();

Koa

javascript
import Koa from 'koa';
import KoaRouter from 'koa-router';
import { koa as voyagerMiddleware } from 'graphql-voyager/middleware';

const app = new Koa();
const router = new KoaRouter();

router.all(
  '/voyager',
  voyagerMiddleware({
    endpointUrl: '/graphql',
  }),
);

app.use(router.routes());
app.use(router.allowedMethods());
app.listen(3001);

Credits

This tool is inspired by graphql-visualizer project.

This project is tested with BrowserStack.

Issues· 106 open

View all issuesOpen on GitHub
  • #462

    React 18.3 -> 19.1 upgrade, lots of warnings from voyager 2.1

    Updated Aug 26, 2026
  • #476

    Investigate minor snapshots changes after migration to dotviz

    Updated Dec 6, 2025
  • #140

    Dark mode

    Updated Nov 13, 2025
  • #355

    How to use a schema instead of an introspection query in index.html?

    Updated Nov 13, 2025
  • #127

    Cross-Origin Request Blocked => to fix it, I need to remove `credentials` in `fetch` call

    Updated May 7, 2025
  • #436

    disable mouse scroll

    Updated Jan 1, 2025
  • #227

    Roadmap

    Updated Dec 19, 2024
  • #122

    Client defined schema filters

    enhancementUpdated Oct 20, 2024
  • #10

    Custom Introspection to support github gist URLs

    featureUpdated Oct 20, 2024
  • #245

    FR: Federation and/or multiple graphs/subgraphs

    Updated Mar 6, 2024

> Tags

TypeScriptapi-documentationgraphqlgraphql-toolsgraphviz

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架