github.com/HaswinVidanage/gqlgen@v0.8.1-0.20220609041233-69528c1bf712/example/scalars/server/server.go (about)

     1  package main
     2  
     3  import (
     4  	"log"
     5  	"net/http"
     6  
     7  	"github.com/HaswinVidanage/gqlgen/example/scalars"
     8  	"github.com/HaswinVidanage/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  }