Registry / web-framework / graphql-go-graphql

graphql-go-graphql

JSON →
library0.8.1gogounverified

A GraphQL implementation in Go, providing a parser, schema builder, and executor.

go get github.com/graphql-go/graphql
INSTALL
IMPORT
SIG · GRAPHQL-GO-GRAPHQL
G
graphql-go-graphql
web-frameworkgov0.8.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

graphql
github.com/graphql-go/graphql

Executes a simple GraphQL query

package main import ( "fmt" "github.com/graphql-go/graphql" ) func main() { fields := graphql.Fields{ "hello": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { return "world", nil }, }, } rootQuery := graphql.ObjectConfig{Name: "RootQuery", Fields: fields} schemaConfig := graphql.SchemaConfig{Query: graphql.NewObject(rootQuery)} schema, _ := graphql.NewSchema(schemaConfig) params := graphql.Params{Schema: schema, RequestString: "{ hello }"} result := graphql.Do(params) fmt.Printf("%+v", result) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.8.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
graphql-go-graphql — go get graphql-go-graphql · libregistry