https://github.com/dgraph-io/gqlparser
A port of the parser from graphql-js into golang
https://github.com/dgraph-io/gqlparser
Last synced: 6 months ago
JSON representation
A port of the parser from graphql-js into golang
- Host: GitHub
- URL: https://github.com/dgraph-io/gqlparser
- Owner: dgraph-io
- License: mit
- Fork: true (vektah/gqlparser)
- Created: 2019-12-11T08:15:07.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-02-15T03:00:44.000Z (over 1 year ago)
- Last Synced: 2026-01-12T03:37:43.795Z (6 months ago)
- Language: Go
- Size: 441 KB
- Stars: 5
- Watchers: 0
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
gqlparser
This is a parser for graphql, written to mirror the graphql-js reference implementation as closely while remaining idiomatic and easy to use.
spec target: June 2018 (Schema definition language, block strings as descriptions, error paths & extension)
This parser is used by [gqlgen](https://github.com/99designs/gqlgen), and it should be reasonablly stable.
Guiding principles:
- maintainability: It should be easy to stay up to date with the spec
- well tested: It shouldnt need a graphql server to validate itself. Changes to this repo should be self contained.
- server agnostic: It should be usable by any of the graphql server implementations, and any graphql client tooling.
- idiomatic & stable api: It should follow go best practices, especially around forwards compatibility.
- fast: Where it doesnt impact on the above it should be fast. Avoid unnecessary allocs in hot paths.
- close to reference: Where it doesnt impact on the above, it should stay close to the [graphql/graphql-js](https://github.com/graphql/graphql-js) reference implementation.