https://github.com/babyfish-ct/federation-r2dbc-example
https://github.com/babyfish-ct/federation-r2dbc-example
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/babyfish-ct/federation-r2dbc-example
- Owner: babyfish-ct
- Created: 2021-06-30T09:21:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-05T06:33:09.000Z (over 4 years ago)
- Last Synced: 2025-01-07T18:18:51.674Z (9 months ago)
- Language: Kotlin
- Size: 207 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# federation-r2dbc-example
This is an example about
1. How to use [apollo-federation](https://www.apollographql.com/docs/federation/) by [graphql-kotlin](https://github.com/ExpediaGroup/graphql-kotlin).
2. How to use [r2dbc](https://r2dbc.io/)## Start department-service
1. cd ${project_home}/server/department-service
2. mvn spring-boot:run
3. access "http://localhost:4001/playground".
Open the document drawer of right side, then you can the definition of "Department":
## Start employee-service
1. cd ${project_home}/server/employee-service
2. mvn spring-boot:run
3. access "http://localhost:4002/playground".
Open the document drawer of right side, then you can the definition of "Department":
## Start gateway
1. cd ${project_home}/gateway
2. yarn install
3. yarn start
4. access "http://localhost:4000/graphql".
Open the document drawer of right side, then you can the definition of "Department":

5. Try to execute this query
```
query {
queryParentAndFetchChild: findDepartments {
id
name
employees {
name
}
}
queryChildAndFetchParent: findEmployees {
id
name
department {
name
}
}
}
```