Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GenResolver ¶
func GenResolver(w io.Writer, options ResolverOptions) (err error)
func ServeGraphQL ¶
func ServeGraphQL(s graphql.Schema) http.HandlerFunc
ServeGraphQL create handler function
func ServeGraphiQL ¶
func ServeGraphiQL(res http.ResponseWriter, req *http.Request)
ServeGraphiQL is a handler function for HTTP servers
Types ¶
type GraphQLError ¶
type GraphQLError struct {
Message string `json:"message"`
}
GraphQLError ...
func (*GraphQLError) Error ¶
func (e *GraphQLError) Error() string
GraphQLError implements error interface
type Request ¶
type Request struct { Query string `json:"query"` Variables map[string]interface{} `json:"variables"` }
Request ...
type ResolverOptions ¶
type Response ¶
type Response struct { Data *json.RawMessage `json:"data"` Errors []GraphQLError `json:"errors,omitempty"` }
Response ...
Click to show internal directories.
Click to hide internal directories.