Skip to content

Latest commit

 

History

History

federation

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Apollo Federation

How to run

cd examples/simple
./start.sh

Then, open http://localhost:4000 in browser.

Generated GraphQL schema

Query example:

query {
  me {
    id
    username
    reviews {
      body
      product {
        name
      }
    }
  }
}

Result:

{
  "data": {
    "me": {
      "id": "1234",
      "username": "Me",
      "reviews": [
        {
          "body": "A highly effective form of birth control.",
          "product": {
            "name": "Trilby"
          }
        },
        {
          "body": "Fedoras are one of the most fashionable hats around and can look great with a variety of outfits.",
          "product": {
            "name": "Trilby"
          }
        }
      ]
    }
  },
}