github.com/jepp2078/gqlgen@v0.7.2/example/scalars/server/server.go (about) 1 package main 2 3 import ( 4 "log" 5 "net/http" 6 7 "github.com/99designs/gqlgen/example/scalars" 8 "github.com/99designs/gqlgen/handler" 9 ) 10 11 func main() { 12 http.Handle("/", handler.Playground("Starwars", "/query")) 13 http.Handle("/query", handler.GraphQL(scalars.NewExecutableSchema(scalars.Config{Resolvers: &scalars.Resolver{}}))) 14 15 log.Fatal(http.ListenAndServe(":8084", nil)) 16 }