Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInitPayload

func GetInitPayload(ctx context.Context) transport.InitPayload

func GraphQL

func GraphQL(exec graphql.ExecutableSchema, options ...Option) http.HandlerFunc

    Deprecated: switch to graphql/handler.New

    func Playground

    func Playground(title string, endpoint string) http.HandlerFunc

      Deprecated: use playground.Handler instead

      Types

      type Config

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

        Deprecated: switch to graphql/handler.New

        type InitPayload

        type InitPayload = transport.InitPayload

          Deprecated: use transport.InitPayload instead

          type Option

          type Option func(cfg *Config)

            Deprecated: switch to graphql/handler.New

            func CacheSize

            func CacheSize(size int) Option

              CacheSize sets the maximum size of the query cache. If size is less than or equal to 0, the cache is disabled. Deprecated: switch to graphql/handler.New

              func ComplexityLimit

              func ComplexityLimit(limit int) Option

                ComplexityLimit sets a maximum query complexity that is allowed to be executed. If a query is submitted that exceeds the limit, a 422 status code will be returned. Deprecated: switch to graphql/handler.New

                func ComplexityLimitFunc

                func ComplexityLimitFunc(complexityLimitFunc func(ctx context.Context) int) Option

                  ComplexityLimitFunc allows you to define a function to dynamically set the maximum query complexity that is allowed to be executed. If a query is submitted that exceeds the limit, a 422 status code will be returned. Deprecated: switch to graphql/handler.New

                  func EnablePersistedQueryCache

                  func EnablePersistedQueryCache(cache PersistedQueryCache) Option

                    Add cache that will hold queries for automatic persisted queries (APQ) Deprecated: switch to graphql/handler.New

                    func ErrorPresenter

                    func ErrorPresenter(f graphql.ErrorPresenterFunc) Option

                      ErrorPresenter transforms errors found while resolving into errors that will be returned to the user. It provides a good place to add any extra fields, like error.type, that might be desired by your frontend. Check the default implementation in graphql.DefaultErrorPresenter for an example. Deprecated: switch to graphql/handler.New

                      func IntrospectionEnabled

                      func IntrospectionEnabled(enabled bool) Option

                        IntrospectionEnabled = false will forbid clients from calling introspection endpoints. Can be useful in prod when you dont want clients introspecting the full schema. Deprecated: switch to graphql/handler.New

                        func RecoverFunc

                        func RecoverFunc(recover graphql.RecoverFunc) Option

                          Deprecated: switch to graphql/handler.New

                          func RequestMiddleware

                          func RequestMiddleware(middleware graphql.ResponseMiddleware) Option

                            RequestMiddleware allows you to define a function that will be called around the root request, after the query has been parsed. This is useful for logging Deprecated: switch to graphql/handler.New

                            func ResolverMiddleware

                            func ResolverMiddleware(middleware graphql.FieldMiddleware) Option

                              ResolverMiddleware allows you to define a function that will be called around every resolver, useful for logging. Deprecated: switch to graphql/handler.New

                              func UploadMaxMemory

                              func UploadMaxMemory(size int64) Option

                                UploadMaxMemory sets the maximum number of bytes used to parse a request body as multipart/form-data in memory, with the remainder stored on disk in temporary files. Deprecated: switch to graphql/handler.New

                                func UploadMaxSize

                                func UploadMaxSize(size int64) Option

                                  UploadMaxSize sets the maximum number of bytes used to parse a request body as multipart/form-data. Deprecated: switch to graphql/handler.New

                                  func WebsocketInitFunc

                                  func WebsocketInitFunc(websocketInitFunc transport.WebsocketInitFunc) Option

                                    WebsocketInitFunc is called when the server receives connection init message from the client. This can be used to check initial payload to see whether to accept the websocket connection. Deprecated: switch to graphql/handler.New

                                    func WebsocketKeepAliveDuration

                                    func WebsocketKeepAliveDuration(duration time.Duration) Option

                                      WebsocketKeepAliveDuration allows you to reconfigure the keepalive behavior. By default, keepalive is enabled with a DefaultConnectionKeepAlivePingInterval duration. Set handler.connectionKeepAlivePingInterval = 0 to disable keepalive altogether. Deprecated: switch to graphql/handler.New

                                      func WebsocketUpgrader

                                      func WebsocketUpgrader(upgrader websocket.Upgrader) Option

                                        Deprecated: switch to graphql/handler.New

                                        type PersistedQueryCache

                                        type PersistedQueryCache interface {
                                        	Add(ctx context.Context, hash string, query string)
                                        	Get(ctx context.Context, hash string) (string, bool)
                                        }

                                        Source Files