open-index/open-npm huggingface dataset:
npm package: @solo.io/graphql-schema-viewer
Description: A React component for viewing a GraphQL schema UI. Requires react-router-v6.
Author: solo.io
Latest version: 0.0.3

# GraphQL Schema Viewer

View your GraphQL schema interactively.

## Installation

Install using your package manager:

```sh
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:

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

# Usage

```tsx
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} />;
};
```