Skip to content

A demo project that demonstrates the usage of Apollo Federation with other tools such as Apollo Gateway, Server and more.

Notifications You must be signed in to change notification settings

ppesti/ApolloFederationDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ApolloFederationDemo

This demo project demonstrates the use of Apollo's products to create GraphQL solutions. Apollo Federation is used to create a federated architecture instead of a monolithic graph.

This demo project only serves as an example and does not provide a step-by-step guide on recreating such applications using tools like Rover Cli.

Here are some useful resources where you can learn about all Apollo Products and GraphQL concepts:

System Structure:

                        Book1 API
                       /
           Book API - <
          /            \
Router - <              Book2 API
          \
           Author API - Author REST 
                        Data Source

Router: the entry point for all requests (via Apollo Router)

  • routes the request to the corresponding APIs/subgraphs
  • does the stitching

Book API: the unified API for all book APIs (via Apollo Server)

  • sends requests to Book1 and Book2 APIs
  • its schema is the union of the Book1 and Book2 schemas (thus Book2), where those fields not in the intersection of the 2 schema definitions, are not required

Book1 APIs: has fields id, authorId, title, pages

Book2 APIs: has fields id, authorId, title, pages, hardcover

Author API: the API for the authors of all Book APIs' contents (both Book1 and Book2 APIs)

  • fetches data from the Author REST API, which returns more fields, than what the Author GQL API needs

Author REST DS: returns data of authors as response of GET requests

  • same functionality as the Author GQL API's, but fetches more fields

About

A demo project that demonstrates the usage of Apollo Federation with other tools such as Apollo Gateway, Server and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published