Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graph-quilt/graph-quilt-gateway
https://github.com/graph-quilt/graph-quilt-gateway
federation graphql graphql-gateway graphql-java orchestrator stitching
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/graph-quilt/graph-quilt-gateway
- Owner: graph-quilt
- License: apache-2.0
- Created: 2022-07-06T17:18:39.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-28T00:08:43.000Z (over 1 year ago)
- Last Synced: 2023-04-28T01:25:07.560Z (over 1 year ago)
- Topics: federation, graphql, graphql-gateway, graphql-java, orchestrator, stitching
- Language: Java
- Homepage: https://graph-quilt.github.io
- Size: 390 KB
- Stars: 10
- Watchers: 8
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
![graphql-gateway](./logo.png)
[![ Master Build and Publish](https://github.com/graph-quilt/graphql-gateway-java/actions/workflows/master.yml/badge.svg?branch=master&event=push)](https://github.com/graph-quilt/graphql-gateway-java/actions/workflows/master.yml)
[![codecov](https://codecov.io/gh/graph-quilt/graphql-gateway-java/branch/master/graph/badge.svg?token=G392PV1BAI)](https://codecov.io/gh/graph-quilt/graphql-gateway-java)
[![Apache 2](http://img.shields.io/badge/license-Apache%202-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0)## This repo is deprecated. Please see [graphql-gateway-java](https://github.com/graph-quilt/graphql-gateway-java)
### Overview
Graph Quilt Gateway exposes data from various graph microservices using a single unified GraphQL schema. These microservices can be dynamically
registered with the Gateway using the `/register` endpoint. It uses [graphql orchestrator library](https://github.com/graph-quilt/graphql-orchestrator-java) for federating schemas from
various data providers.Top Highlights include
* Dynamic registration so that the gateway is loosely coupled with the provider development lifecycle.
* Registering REST endpoints using the [@adapter](https://github.com/graph-quilt/graphql-service-adapters) directive and Service DSL
* Attribute Based Access Control using the [graphql-authorization-java](https://github.com/graph-quilt/graphql-authorization-java) library.### Pre-requisites
Make sure you have the following installed on your machine
* jdk 1.8
* maven
* docker
* awscli### Running the graph-quilt gateway locally
When running the application locally, [localstack](https://localstack.cloud/) is used to mock AWS S3. Follow this steps to start the application.
* Build the project
```
mvn clean install
```* Run aws configure. Enter any value to the prompts presented. Since localstack is used, a real AWS credential is not needed.
```
aws configure
```* Start Docker daemon if not running.
* Start the local registry. This starts a localstack docker container.
```
./local_registry/start.sh
```
* Set up the local registry. This will initialize the registry with example service providers in `local_registry` folder.
```
./local_registry/setup.sh --empty-registry
```
* Start the application. Once started, it listens on port 7000```
./run.sh
```
OR
Run the class `GraphqlGatewayApplication` as Spring Application using IntelliJ. Set the active profile as **local**.
**No need to restart the application when new you register a new provider service**.### Run with docker compose
The docker compose will start both **localstack** and **graphql gateway**. To start, run the command
`$ docker compose -f docker-compose-local-registry.yml up`
This will start with the example service providers from [./local_registry/dev/registrations/1.0.0](./local_registry/dev/registrations/1.0.0). However,
there's no actual backend service yet so if you query, you'll get "Connection Refused error.". We will add these example services
as part of docker compose in the near future so that and end to end call can be made.You should see the Spring Boot Logo and a message "Started GraphQLGatewayApplication ..."
### Test using GraphiQL* Navigate to [http://localhost:7000/graphiql](http://localhost:7000/graphiql)
### Documentation
[graphql-gateway-documentation](https://graph-quilt.github.io/graphql-orchestrator-java/)### Intellij development
* [Steps to enable lombok in IntelliJ](https://www.baeldung.com/lombok-ide)
* IntelliJ style guide is available in `src/format/intellij-styleguide.xml`.## Contributing
Please see our [contribution guide](.github/CONTRIBUTING.md)