GrapQL-Link is an GraphQL gateway that lets you easily proxy to other
GraphQL servers.
- Consolidate access to multiple upstream GraphQL servers via a single GraphQL gateway server.
- Introspection of the upstream server to discover their GraphQL schemas.
- The configuration uses GraphQL queries to define which upstream fields and types can be accessed.
- Upstream types, that are accessible, are automatically merged into the gateway schema.
- Type conflict due to the same type name existing in multiple upstream servers can be avoided by renaming types in the gateway.
- Supports GraphQL Queries, Mutations, and Subscriptions
- Production mode settings to avoid the gateway's schema from dynamically changing due to changes in the upstream schemas.
- Uses the dataloader pattern to batch multiple query requests to the upstream servers.
- Link the graphs of different upstream servers by defining additional link fields.
- Web based configuration UI
- OpenAPI based upstream servers (get automatically converted to a GraphQL Schema)
Please download latest github release for your platform
If you have a recent go SDK installed:
go get -u github.com/aerogear/graphql-link
Use the following command to create a default server configuration file.
$ graphql-link config init
Created: graphql-link.yaml
Start the gateway by running:
graphql-link serve
Then run the server using this command:
$ graphql-link serve
2020/07/07 10:16:29 GraphQL endpoint is running at http://127.0.0.1:8080/graphql
2020/07/07 10:16:29 Gateway Admin UI and GraphQL IDE is running at http://127.0.0.1:8080
You can then use the Web UI at http://127.0.0.1:8080 to configure the gateway.
The graphql-link serve
command will run the gateway in development mode. Development mode enables the configuration web interface and will cause the gateway to periodical download upstream schemas on start up. The schema files will be stored in the upstreams
directory (located in the same directory as the gateway configuration file). If any of the schemas cannot be downloaded the gateway will fail to startup.
You can use graphql-link serve --production
to enabled production mode. In this mode, the configuration web interface is disabled, and the schema for the upstream severs will be loaded from the upstreams
directory that they were stored when you used development mode. This ensures that your gateway will have a consistent schema presented, and that it's start up will not be impacted by the availability of the upstream
servers.
go build -o=graphql-link main.go
docker pull aerogear/graphql-link
- We love pull requests
- Open Issues
- graphql-link is written in Go. It should work on any platform where go is supported.
- Built on this GraphQL framework
Project was initialy build by @chirino as graphql-gw
.