github.com/jepp2078/gqlgen@v0.7.2/example/selection/server/server.go (about)

     1  package main
     2  
     3  import (
     4  	"log"
     5  	"net/http"
     6  
     7  	"github.com/99designs/gqlgen/example/selection"
     8  	"github.com/99designs/gqlgen/handler"
     9  )
    10  
    11  func main() {
    12  	http.Handle("/", handler.Playground("Selection Demo", "/query"))
    13  	http.Handle("/query", handler.GraphQL(selection.NewExecutableSchema(selection.Config{Resolvers: &selection.Resolver{}})))
    14  	log.Fatal(http.ListenAndServe(":8086", nil))
    15  }