https://github.com/t1/graphql-federation-demo
https://github.com/t1/graphql-federation-demo
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/t1/graphql-federation-demo
- Owner: t1
- Archived: true
- Created: 2021-03-24T16:13:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-18T04:27:29.000Z (almost 5 years ago)
- Last Synced: 2025-03-23T19:23:29.711Z (over 1 year ago)
- Language: Java
- Size: 220 KB
- Stars: 1
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
=== What's This?
Demo for the https://github.com/smallrye/smallrye-graphql[SmallRye GraphQL] extension library to add https://www.apollographql.com/docs/federation/federation-spec/[GraphQL Federation].
There's also an experiment for a Quarkus extension.
=== Howto Run The Demo
==== Backend Services: Java
The `film` and `review` services build a `war` that can run on a JEE server (tested with WildFly 23.0.1), either when the GraphQL feature pack is installed, or when built with the `fat` profile, so it includes the SmallRye GraphQL dependencies.
[NOTE]
The feature-pack currently contains a version of SmallRye GraphQL that has a bug that turns the `_Any` type into `_AnyInput`. So you'll have to use the `fat` deployment for now.
It contains the federation classes and a demo app delivering reviews for the films.
==== Gateway Service: Node
The federating `gateway` is a node service. Start it with the `start-gateway` commands defined in the `package.json`
==== Testing
Open the gateway playground at http://localhost:4000
An example query is:
[source]
----
{
films {
id
title
year
reviews {
score
comments
}
}
}
----
== GraphQL Tools
https://gqless.com Client Generator
https://graphql-hive.com Schema Registry + API Gateway
https://www.prisma.io expose PostgreSQL, etc. as GraphQL
similar: mesh