Skip to content

Codyonesock/poke-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poke-Graph: Minimal Apollo Federation Demo

This project demonstrates a simple Apollo Federation setup using TypeScript and Node.js, with Pokémon card data and user management as subgraphs.

Structure

  • cards-subgraph/: Serves Pokémon card data from a JSON file
  • users-subgraph/: Manages users and their assigned cards
  • gateway/: Federates the subgraphs into a single GraphQL endpoint

How it works

  • Each subgraph is a standalone Node server exposing its own GraphQL schema
  • The gateway composes both subgraphs into a single API
  • All queries and mutations go through the gateway (http://localhost:4000/graphql)

Example Queries

See each subgraph's README for sample queries and mutations.

Getting Started

  1. Install dependencies in each folder: npm install
  2. Build each service: npm run build
  3. Start each service: npm start
    • Start cards-subgraph and users-subgraph first, then the gateway
  4. Open Apollo Sandbox/Playground at http://localhost:4000/graphql

About

Learning GraphQL with some Pokemon data!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors