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.
- 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 a working example of GraphQL subscriptions.
- Next.js - Simple demo project integrating Grats, Next.js and Yoga.
- Deno - Using Grats in a Deno project, with
Deno.serveand graphql-http. Covers the two settings a Deno project needs.
Capabilities of Grats
- Strict Semantic Nullability
- 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
- Incremental Migration
- A snapshot of a project in the middle of an incremental migration to Grats using Schema Merging.
Standalone examples
Examples of Grats outside of the Grats repository:
- Grats Relay Example
- Shows configuring Grats and Relay together
- Click to definition from field use to resolver
- Winamp Skin Museum
- The Winamp Skin Museum uses Grats to power its GraphQL API