Registry /
web-framework / graph-gophers-graphql-go
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/graph-gophers/graphql-go
Serve a simple GraphQL endpoint.
package main
import (
"log"
"net/http"
"github.com/graph-gophers/graphql-go"
"github.com/graph-gophers/graphql-go/relay"
)
func main() {
s := `
schema {
query: Query
}
type Query {
hello: String!
}
`
schema := graphql.MustParseSchema(s, &struct{ Hello string }{"world"})
http.Handle("/query", &relay.Handler{Schema: schema})
log.Fatal(http.ListenAndServe(":8080", nil))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.10.2latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.