{"repo":"graph-gophers/graphql-go","free":true,"listed":false,"github":"https://github.com/graph-gophers/graphql-go","clone":"git clone https://github.com/graph-gophers/graphql-go.git","description":"GraphQL server with a focus on ease of use","language":"Go","stars":4759,"topics":["graphql","go","golang"],"license":"BSD-2-Clause","category":"api-integrations-sdks","readme_excerpt":"graphql-go The goal of this project is to provide full support of the September 2025 GraphQL specification with a set of idiomatic, easy to use Go packages. Features - minimal API - support for context.Context - support for the OpenTelemetry and OpenTracing standards - schema type-checking against resolvers - resolvers are matched to the schema based on method sets (can resolve a GraphQL schema with a Go interface or Go struct). - handles panics in resolvers - parallel execution of resolvers - inspect the selected fields and their args to prefetch data and avoid the N+1 query problem - subscriptions - sample WS transport (Some) Documentation Getting started In order to run a simple GraphQL server locally create a main.go file with the following content: Then run the file with go run main.go . To test: For more realistic usecases check our examples section. Resolvers A resolver must have one method or field for each field of the GraphQL type it resolves. The method or field name has to be exported and match the schema's field's name in a non-case-sensitive way. You can use struct fields as resolvers by using SchemaOpt: UseFieldResolvers() . For example, When using UseFieldResolvers schema option, a struct field will be used only when: - there is no method for a struct field - a struct field does not implement an interface method - a struct field does not have arguments The method has up to two arguments: - Optional context.Context argument. - Mandatory struct { ... } argument ","default_branch":null,"files":null,"tree":[],"storefront":"/r/graph-gophers","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/graph-gophers/graphql-go/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}