Query Language

18 projects

This category is mostly about GraphQL, with a second group of libraries for querying JSON documents and parsing filter expressions in REST APIs. For GraphQL servers, the main decision is schema-first versus code-first: you either write the schema in SDL and generate Go code, or you build the schema from Go types and resolvers at runtime.

gqlgen from 99designs is schema-first and generates type-safe resolvers and models, which suits teams that want the compiler to catch schema mismatches. graphql-go/graphql is a code-first port of the reference graphql-js implementation, where you assemble the schema with Go structs. graph-gophers/graphql-go parses SDL and binds resolvers by method name, which keeps setup light. For JSON, gojsonq queries decoded data, jsonpath and jsonslice implement JSONPath, gnata implements JSONata, and dasel is a command-line tool for querying and updating JSON, YAML, TOML and XML. rql and rqp turn URL query parameters into filters for REST endpoints.

For a new GraphQL API, gqlgen is the most common pick because generated code is checked at compile time and resolvers are plain Go. Choose a code-first library if your schema is assembled dynamically. For JSON querying inside a program, prefer decoding into structs with encoding/json first, and use a query library only for documents whose shape you do not control.

gqlgenby 99designs

Go generate based graphql server library.

github.com/99designs/gqlgenGo 1.26+ 17 dependenciesv0.17.98updated 4d ago

10.8k

graphql-go

Implementation of GraphQL for Go.

github.com/graphql-go/graphqlGo 1.21+ No dependencies v0.8.1updated 4mo ago

10.1k

daselby tomwright

Query and update data structures using selectors from the command line. Comparable to jq/yq but supports JSON, YAML, TOML and XML with zero runtime dependencies.

github.com/tomwright/dasel/v3Go 1.25+ 11 dependenciesv3.11.2updated today

8.1k

graphqlby neelance

GraphQL server with a focus on ease of use.

github.com/graph-gophers/graphql-goGo 1.25+ 3 dependenciesv1.11.0updated today

4.8k

gojsonqby thedevsaddam

A simple Go package to Query over JSON Data.

github.com/thedevsaddam/gojsonq/v2Go 1.13+ No dependencies v2.5.2updated 3y ago

2.2k

playby paololazzari

A TUI playground to experiment with your favorite programs, such as grep, sed, awk, jq and yq.

github.com/paololazzari/playGo 1.18+ 6 dependenciesv0.4.0updated 1y ago

595

rqlby a8m

Resource Query Language for REST API.

github.com/a8m/rqlGo 1.16+ 1 dependencyv1.3.0updated 2y ago

367

jsonqlby elgs

JSON query expression library in Golang.

updated 8mo ago

280

gnataby RecoLabs

Pure-Go implementation of the JSONata 2.x query and transformation language.

github.com/recolabs/gnataGo 1.25+ 1 dependencyv0.6.2updated 15d ago

259

jsonsliceby bhmj

Jsonpath queries with advanced filters.

github.com/bhmj/jsonsliceGo 1.17+ 1 dependencyv1.1.3updated 2y ago

91

rqpby timsolov

Query Parser for REST API. Filtering, validations, both AND, OR operations are supported directly in the query.

github.com/timsolov/rest-query-parserGo 1.13+ 4 dependenciesupdated 2y ago

91

mqlby hashicorp

Model Query Language (mql) is a query language for your database models.

github.com/hashicorp/mqlGo 1.24+ 3 dependenciesv0.1.5updated 5mo ago

67

govenby SeldonIO

A drop-in query language for any database schema.

github.com/seldonio/govenGo 1.18+ 5 dependenciesv0.2.1updated 4y ago

61

api-fuby ccbrown

Comprehensive GraphQL implementation.

github.com/ccbrown/api-fuGo 1.18+ 7 dependenciesupdated 2y ago

58

strafby SonicRoshan

Easily Convert Golang structs to GraphQL objects.

github.com/SonicRoshan/strafGo 1.14+ 2 dependenciesupdated 6y ago

40

jsonpathby AsaiYusuke

A query library for retrieving part of JSON based on JSONPath syntax.

github.com/AsaiYusuke/jsonpath/v2Go 1.25+ 1 dependencyv2.2.0updated 2mo ago

32

gwsby Zaba505

Apollos' "GraphQL over Websocket" client and server implementation.

github.com/zaba505/gwsGo 1.14+ 1 dependencyv0.5.0updated 6y ago

6

grapherby reaganiwadha

A GraphQL field builder utilizing Go generics with extra utilities and features.

github.com/reaganiwadha/grapherGo 1.18+ 4 dependenciesv0.0.0updated 1y ago

4
Esc

Type to search every entry. ↑↓ to move, Enter to open.