Novvum / graphql-birdseye
- пятница, 3 мая 2019 г. в 00:18:52
TypeScript
View any GraphQL schema as a dynamic and interactive graph. 🦅

Birdseye is an interactive tool that dynamically displays GraphQL schemas. It helps teams visualize and understand the nodes and connections within their schema. Birdseye was built using jointJS and makes for a lightweight addition to any React project.
Birdseye was inspired by GraphQL Voyager and the Apis-guru team. We found that Voyager would add 1.2 MB to our projects, which was too big for us. This motivated us to create Birdseye, which has a bundle size of less than 200 KB. Birdseye is open source and free to use and explore.
Install using NPM or yarn
npm install --save graphql-birdseyeyarn add graphql-birdseyeHere’s an example of how to use Birdseye in a React project. See the API Reference for how to pass your schema to the component.
import * as React from 'react';
import GraphqlBirdseye from 'graphql-birdseye';
class Example extends React.Component {
render() {
return (
<GraphqlBirdseye
introspectionQuery={dummySchema.data}
style={{ height: "100vh" }}
/>
);
}
}Try this example in code sandbox:
You can also download and test the code for our demo site in the example folder in the repository.
| Name | Type | Description |
|---|---|---|
| introspectionQuery | JSON object | Pass your schema as a JSON of an introspection query response. Use this introspection query to return your schema as a GraphQL schema object. |
| schema | GraphQL schema object | Pass your schema as a GraphQL schema object. Return using makeExecutableSchema from GraphQL tools. |
| style | object | Pass in an object to style the container |
| theme | object | An object defining the theme of the components. Theme objects should follow the type defined here. Here's a full example. |
We have plans to keep improving Birdseye. Here's what is next:
This is an open source project. To learn how to contribute, please check out our contributing guide.
MIT © Novvum
Made with