Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/setchy/graphql-java-kickstart-federation-example
A GraphQL Java Kickstart federation example, ported from netflix/dgs-federation-example.
https://github.com/setchy/graphql-java-kickstart-federation-example
apollo-federation apollo-gateway graphql java spring-boot
Last synced: 18 days ago
JSON representation
A GraphQL Java Kickstart federation example, ported from netflix/dgs-federation-example.
- Host: GitHub
- URL: https://github.com/setchy/graphql-java-kickstart-federation-example
- Owner: setchy
- Created: 2021-04-11T13:00:58.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-02T22:56:13.000Z (20 days ago)
- Last Synced: 2024-05-03T06:34:34.745Z (20 days ago)
- Topics: apollo-federation, apollo-gateway, graphql, java, spring-boot
- Language: Java
- Homepage:
- Size: 577 KB
- Stars: 22
- Watchers: 1
- Forks: 12
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Lists
- awesome-graphql - graphql-java-kickstart-federation-example - A GraphQL Java Kickstart federation example. (Implementations / Java)
README
A GraphQL Java Kickstart / GraphQL Spring Boot federation example, ported from [netflix/dgs-federation-example](https://github.com/Netflix/dgs-federation-example).
The repository contains three separate projects:
1. `shows`: A Java GraphQL service providing the federated `Show` type
2. `reviews`: A Java GraphQL service that extends the `Show` type with `reviews`
3. `apollo-gateway`: An instance of Apollo Server acting as the Federated GatewayThe `shows` and `reviews` projects are Maven projects.
The `apollo-gateway` is a Node project.Running the demo
----1. Start `show` by running the Spring Boot app from the IDE
2. Start `reviews` by running the Spring Boot app from the IDE
3. Run `npm install` in the `apollo-gateway` project
4. Run `node index.js` in the `apollo-gateway` project
5. Open http://localhost:4000 for the query editorThe following is a federated query that should work.
```graphql
{
shows {
title
reviews {
starRating
}
}
}
```