@solo.io/graphql-schema-viewer
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

GraphQL Schema Viewer

View your GraphQL schema interactively.

Installation

Install using your package manager:

yarn add react react-dom react-router react-router-dom @emotion/styled @emotion/react @solo.io/graphql-schema-viewer

Then import styles in your app, where this package is used:

import "@solo.io/graphql-schema-viewer/styles.css";
// ...rest of file

Usage

const sdl = `# The query type, represents all of the entry points into our object graph
type Query {
  pets: [Pet]
  pet(id: Int!): Pet
}

type Mutation {
  addPet(pet: InputPet!): Pet
}

type Pet {
  id: ID!
  name: String!
}

input InputPet {
  id: ID!
  name: String!
  tag: String
}
`;

const App = () => {
  return <GraphqlSchemaViewer sdl={sdl} />;
};

Package Sidebar

Install

npm i @solo.io/graphql-schema-viewer

Weekly Downloads

0

Version

0.0.3

License

Apache-2.0

Unpacked Size

1.26 MB

Total Files

87

Last publish

Collaborators

  • nicholasbucher