Documentation

Overview

    Package graphql is a `net/http` handler implementing the GraphQL protocol for the REST Layer framework.

    This package is part of the rest-layer project. See http://rest-layer.io for full REST Layer documentation.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Handler

    type Handler struct {
    	// contains filtered or unexported fields
    }

      Handler is a net/http compatible handler used to serve the configured GraphQL API.

      func NewHandler

      func NewHandler(i resource.Index) (*Handler, error)

        NewHandler creates an new GraphQL API HTTP handler with the specified resource index.

        func (*Handler) ServeHTTP

        func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

          ServeHTTP handles requests as a http.Handler

          func (*Handler) ServeHTTPC

          func (h *Handler) ServeHTTPC(ctx context.Context, w http.ResponseWriter, r *http.Request)

            ServeHTTPC handles requests as a xhandler.HandlerC (deprecated).