Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graph-quilt/graphql-gateway-java
https://github.com/graph-quilt/graphql-gateway-java
hacktoberfest hacktoberfest2023
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/graph-quilt/graphql-gateway-java
- Owner: graph-quilt
- License: apache-2.0
- Created: 2023-04-11T19:03:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-30T23:29:10.000Z (over 1 year ago)
- Last Synced: 2023-10-31T00:28:20.910Z (over 1 year ago)
- Topics: hacktoberfest, hacktoberfest2023
- Language: Java
- Homepage:
- Size: 292 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
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

[](https://github.com/graph-quilt/graphql-gateway-java/actions/workflows/master.yml)
[](https://codecov.io/gh/graph-quilt/graphql-gateway-java)
[](http://www.apache.org/licenses/LICENSE-2.0)### Overview
graphql-gateway-java 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.Highlights:
* 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.### Prerequisites
Make sure you have the following installed on your machine:
* [Java 11](https://www.oracle.com/java/technologies/downloads/#java11)
* [Maven](https://maven.apache.org/install.html)
* [Docker](https://docs.docker.com/engine/install/)
* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)### Running graphql-gateway-java locally
When running the application locally, [localstack](https://localstack.cloud/) is used to mock AWS S3. Follow these steps to start the application.
1. Build the project:
```
mvn clean install
```2. Run aws configure. Enter any value to the prompts presented. Since localstack is used, a real AWS credential is not needed, but make sure to input a valid region name (e.g. `us-west-1`) and output format (e.g. `json`).
```
aws configure
```3. Start Docker daemon if not already running.
4. Start the local registry. This starts a localstack docker container.
```
./local_registry/start.sh
```
5. Set up the local registry. This will initialize the registry with example service providers in `local_registry` folder.
```
./local_registry/setup.sh --empty-registry
```
6. 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**.> **NOTE: You do not need to restart the application when you register a new provider service**.
### Test using GraphiQL
* Navigate to [http://localhost:7000/graphiql](http://localhost:7000/graphiql)
* We also have [example subgraphs](https://github.com/graph-quilt/example-subgraphs) with registration instructions for easy testing.### 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).