Documentation ¶
Overview ¶
Package handler implements an HTTP interface to a Schema.
It is intended to serve as an example rather than a full implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Message string `json:"message"`
}
Error represents an error the occured while parsing a graphql query or while generating a response.
type ExecutorHandler ¶
type ExecutorHandler struct {
// contains filtered or unexported fields
}
ExecutorHandler makes a executor.Executor querable via HTTP
func New ¶
func New(executor *executor.Executor) *ExecutorHandler
New constructs a ExecutorHandler from a executor.
func (*ExecutorHandler) ServeHTTP ¶
func (h *ExecutorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP provides an entrypoint into a graphql executor. It pulls the query from the 'q' GET parameter.
Click to show internal directories.
Click to hide internal directories.