Skip to content

victorandree/apollo-federation-relay

Repository files navigation

Apollo Federation and Relay conventions

Combining Apollo Federation with Relay server specifications

Support

Relay Input Object Mutations are no longer a required part of Relay, and the linked specification appears to have been removed. It was never affected by Apollo Federation.

Quick start

npm install
npm run start

Then you can query for products from the global node interface:

query {
  node(id: "UHJvZHVjdDox") {
    id
    ... on Product {
      name
    }
  }
}

You can also query for reviews, which can review any node supported by the review service:

query {
  reviews {
    id
    body
    rating
    node {
      __typename
      id
      ... on Product {
        name
        reviews {
          edges {
            node {
              rating
            }
          }
        }
      }
    }
  }
}

TODO

  • Automatically generate schema for Node resolution service in gateway
  • Run Node resolution service locally in gateway
  • Support query { node } in each service

About

A demo of Apollo Federation and global Node resolution

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •