Examples
Working minimal code examples are often the best way to see how a library should be configured. It gives a working starting point that one can borrow from when setting up their own project. To that end, Grats' repository contains a number of examples that demonstrate how to use Grats with various frameworks and libraries. Each example is covered by our integration tests to ensure it's in working order.
Grats with other libraries
- Apollo Server - A very minimal example of using Grats with Apollo Server.
- Express GraphQL - Simple demo project integrating Grats, Express and express-graphql.
- GraphQL HTTP - Simple demo project integrating Grats, Express and graphql-http.
- Yoga - Simple demo project integrating Grats and Yoga with Node's built-in HTTP server. This example also includes an working example of GraphQL subscriptions.
- NextJS - Simple demo project integrating Grats and Next.js and Yoga.
Capabilities of Grats
- Strict Semantic Nullabilty
- This example demonstrates Grats' experimental support for Strict Semantic Nullability.
- Production App
- Demonstrates many of the practical concerns of implementing GraphQL in production.
- Node/Connection (Relay schema)
- Dataloader pattern
- Subscriptions
- @stream
- Custom scalars
- GraphQL context
Standalone examples
Examples of Grats outside of the Grats repository:
- Grats Relay Example
- Shows configuring Grats and Relay together
- Click to defintion from field use to resolver
- Winamp Skin Museum
- The Winamp Skin Museum uses Grats to power its GraphQL API