Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tck1/apollo-graphiql-playground

Apollo Server plugin for the GraphiQL Playground
https://github.com/tck1/apollo-graphiql-playground

apollo apollo-server graphiql graphql playground server

Last synced: about 2 months ago
JSON representation

Apollo Server plugin for the GraphiQL Playground

Awesome Lists containing this project

README

        

# `apollo-graphiql-playground`

[![npm](https://img.shields.io/npm/v/apollo-graphiql-playground)](https://www.npmjs.com/package/apollo-graphiql-playground)

Plugin for using [GraphiQL](https://github.com/graphql/graphiql) playground inside an [Apollo Server](https://github.com/apollographql/apollo-server).

## Example

```ts
import { ApolloServerPluginLandingPageGraphiQLPlayground } from 'apollo-graphiql-playground'

const server = new ApolloServer({
plugins: [
ApolloServerPluginLandingPageGraphiQLPlayground({
shouldPersistHeaders: true,
})
],
})
```

### Options

- `url?` (default: `/graphql`): Which URL should the playground should use.
- `shouldPersistHeaders?`: Toggles if the contents of the headers editor are persisted in storage.