Skip to content

Latest commit

 

History

History
68 lines (55 loc) · 1.34 KB

README.md

File metadata and controls

68 lines (55 loc) · 1.34 KB

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