A GraphQL implementation for a GraphQL API that is easy to use and understand while still providing good performance.
- Simple binding of GraphQL schema elements to golang types and functions.
- Multiple resolver options including dynamic resolvers.
- High performance
- No external dependencies.
- The first release is out! Benchmarks look good, documentation is complete, and examples available.
The examples provide the best explanation for how to use the package.
- Examples of each resolver approach.
go get github.com/uhn/ggql
To build and install the ggqlgen
application:
go install ./...
See CHANGELOG.md
Benchmarks are against graphql-go which is currently the most common golang GraphQL package. The ggql-i package is using the interface resolvers (Resolver and ListResolver) while the ggql framework is using reflection. For a more comprehensive comparison go to graphql-benchmarks.
- Last updated: 2020-06-10
- OS: Linux (version: 5.7.1-050701-generic, arch: x86_64)
- CPU Cores: 12
- Connections: 1000
- Duration: 20 seconds
- Units:
- Rates are in requests per second.
- Latency is in milliseconds.
- Verbosity is the number of non-blank lines of code excluding comments.
Language | Framework(version) | Rate | Median Latency | Average Latency | 90th % | 99th % | Std Dev | Verbosity |
---|---|---|---|---|---|---|---|---|
go (1.14) | ggql-i (1.0.0) | 205058 | 0.062 | 0.060 | 0.068 | 0.088 | 0.02 | 253 |
go (1.14) | ggql (1.0.0) | 201986 | 0.062 | 0.057 | 0.066 | 0.073 | 0.02 | 176 |
go (1.14) | graphql-go (0.7.9) | 32843 | 0.078 | 0.075 | 0.086 | 0.102 | 0.03 | 378 |
Language | Framework(version) | Rate | Median Latency | Average Latency | 90th % | 99th % | Std Dev | Verbosity |
---|---|---|---|---|---|---|---|---|
go (1.14) | ggql-i (1.0.0) | 205058 | 0.062 | 0.060 | 0.068 | 0.088 | 0.02 | 253 |
go (1.14) | ggql (1.0.0) | 201986 | 0.062 | 0.057 | 0.066 | 0.073 | 0.02 | 176 |
go (1.14) | graphql-go (0.7.9) | 32843 | 0.078 | 0.075 | 0.086 | 0.102 | 0.03 | 378 |
Language | Framework(version) | Rate | Median Latency | Average Latency | 90th % | 99th % | Std Dev | Verbosity |
---|---|---|---|---|---|---|---|---|
go (1.14) | ggql (1.0.0) | 201986 | 0.062 | 0.057 | 0.066 | 0.073 | 0.02 | 176 |
go (1.14) | ggql-i (1.0.0) | 205058 | 0.062 | 0.060 | 0.068 | 0.088 | 0.02 | 253 |
go (1.14) | graphql-go (0.7.9) | 32843 | 0.078 | 0.075 | 0.086 | 0.102 | 0.03 | 378 |
Unless otherwise noted, the GGQL source files are distributed under the Apache Version 2.0 license found in the LICENSE file.