APIs-guru/graphql-voyager là dự án ưu tiên API trên GitHub với 8.2k sao, viết chủ yếu bằng TypeScript. 🛰️ Represent any GraphQL API as an interactive graph
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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.
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
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+
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
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.
GitHub topics của APIs-guru/graphql-voyager: "api-documentation", "graphql", "graphql-tools", "graphviz", "visualization". TopGit xếp repo vào nhóm API.
APIs-guru/graphql-voyager có phải mã nguồn mở không?
Có — APIs-guru/graphql-voyager phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/APIs-guru/graphql-voyager.
APIs-guru/graphql-voyager có trang demo không?
Dự án có trang chủ ở https://apis.guru/graphql-voyager/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
APIs-guru/graphql-voyager còn đang phát triển không?
Commit gần nhất trên APIs-guru/graphql-voyager là 6 tháng trước (theo timestamp GitHub). Repo có 549 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
APIs-guru/graphql-voyager dùng license gì?
APIs-guru/graphql-voyager phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc thêm về APIs-guru/graphql-voyager ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/APIs-guru/graphql-voyager là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về graphql-voyager?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về graphql-voyager.