Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

graphql-client-example-server

zth1.9kMIT1.5.2

A simple GraphQL server for powering examples of various GraphQL clients in various languages.

readme

graphql-client-example-server

A simple GraphQL server for powering examples of various GraphQL clients in various languages.

Installation

You can install and run the server without needing to clone this repo by doing:

npm install -g graphql-client-example-server

...and then simply running with graphql-client-example-server.

You can also provide a PORT environment variable to control what port the server will run on (default 4000).

Developing

Running

yarn start

Building

yarn && yarn build --watch

// In a separate terminal
yarn start

Features to cover

  • <input checked="" disabled="" type="checkbox"> Node interface (for Relay)
  • <input checked="" disabled="" type="checkbox"> Globally unique IDs
  • <input checked="" disabled="" type="checkbox"> Database IDs
  • <input checked="" disabled="" type="checkbox"> Connection-based pagination
  • <input checked="" disabled="" type="checkbox"> Limit/offset-based pagination
  • <input checked="" disabled="" type="checkbox"> Mutations
  • <input checked="" disabled="" type="checkbox"> Enums
  • <input checked="" disabled="" type="checkbox"> Custom scalars
  • <input checked="" disabled="" type="checkbox"> Unions
  • <input checked="" disabled="" type="checkbox"> Subscriptions
  • <input checked="" disabled="" type="checkbox"> Defer/stream
  • <input checked="" disabled="" type="checkbox"> Artifical delay's to emphasize defer/stream

changelog

Changelog

master

1.5.1

  • Add back @include and @skip directives.

1.5.0

  • Properly support Relay defer/stream.

1.4.0

  • Bump dependencies
  • Move to GraphQL Yoga
  • Add @defer/stream support
  • Now every DB operation results in a delay, set to 500ms by default
  • Paginated and connection resolvers now return AsyncIterable on results and edges.

Kudos to @XiNiHa who did the whole modernization!

1.2.0

  • Added new simple mutation variants for the todo's, that are more easily usable with Apollo.

1.1.3

  • Adjust image URL:s for user avatars.

1.1.2

  • Releases now include README.md.

1.1.1

  • Added root field userById to retrieve a User by id.