apollo-typescript-example icon indicating copy to clipboard operation
apollo-typescript-example copied to clipboard

Apollo Client 2.0 + TypeScript example

Apollo Client + TypeScript minimal example

Minimal example showcasing type-safe access to authenticated GitHub GraphQL API via Apollo Client 2.0 & apollo-codegen. ✨

image

Post on Medium.

How to run

  1. yarn
  2. Enter your GitHub personal access token to the .env file.
  3. yarn generate-schema – you can inspect schema.ts after it finishes
  4. yarn start