Pup

v2.x

GraphQLGraphQL Playground

As part of the @cleverbeagle/pupql package, in Pup, if you visit http://localhost:3000/graphql, you can access the GraphQL Playground: an application that lets you interact with your GraphQL schema in an IDE-style environment.

The GraphQL Playground
The GraphQL Playground

This is a great way to "mock out" your GraphQL schema's responses before you wire them up to your user interface.

Queries requiring authorization will fail

By default, the GraphQL Playground does not offer a mechanism for passing any authentication information to your GraphQL schema. This means that if you rely on the context.user object provided by PupQL, your queries will fail. When testing, it's best to remove any authorization code, test your responses, and add authorization once you've wired up your queries to your UI.