https://github.com/bogdal/ariadne-federation-demo
This is an example of how to use Apollo Federation with Ariadne.
https://github.com/bogdal/ariadne-federation-demo
apollo-federation ariadne demo
Last synced: 6 months ago
JSON representation
This is an example of how to use Apollo Federation with Ariadne.
- Host: GitHub
- URL: https://github.com/bogdal/ariadne-federation-demo
- Owner: bogdal
- Created: 2020-01-29T16:56:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-11T18:56:20.000Z (over 5 years ago)
- Last Synced: 2025-03-24T12:21:38.954Z (7 months ago)
- Topics: apollo-federation, ariadne, demo
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 26
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ariadne Federation Demo
This is an example of how to use `Apollo Federation` with [Ariadne](https://ariadnegraphql.org/docs/apollo-federation).
The `microservices` folder contains separate GraphQL services that we want to combine into a single data graph.
### Let's start
First of all, we need to install all required dependencies:
```bash
pip install -r requirements.txt
```
```bash
npm install
```
Now, we can run all of the microservices at once using the following command:```bash
npm run start-services
```The last thing is to run the gateway. Open a new terminal window and use:
```bash
npm run start-gateway
```
Gateway will be available at http://localhost:4000## Example queries
Now we can execute GraphQL operations as if it were implemented as a monolithic service:
```graphql
query {
me {
name
reviews {
body
product {
upc
name
}
}
}topProducts(first: 3) {
upc
name
reviews {
body
author {
name
}
}
}
}
```