Versions in this module Expand all Collapse all v0 v0.0.8 Mar 29, 2020 Changes in this version + const ContentTypeFormURLEncoded + const ContentTypeGraphQL + const ContentTypeJSON + const ContextTypeMultipart + const DefaultMultipartParsingBufferSize + var Duration = graphql.NewScalar(graphql.ScalarConfig{ ... }) + var UploadScalar = graphql.NewScalar(graphql.ScalarConfig{ ... }) + var Void = graphql.NewScalar(graphql.ScalarConfig{ ... }) + func BeforeResolve(resolve interface{}, checker interface{}) (interface{}, error) + func HandleHTTPOptions(w http.ResponseWriter, r *http.Request) + type Arguments interface + GraphQLArguments func() + type ContextError interface + StatusCode func() int + type CustomParserInput interface + GraphQLInputParseValue func(map[string]interface{}) interface{} + type Engine struct + func NewEngine(options Options) *Engine + func (engine *Engine) AddMutation(resolve interface{}, name string, description string, tags ...string) error + func (engine *Engine) AddQuery(resolve interface{}, name string, description string, tags ...string) error + func (engine *Engine) AddSubscription(onSubscribed, onUnsubscribed interface{}, name string, description string, ...) error + func (engine *Engine) AddSubscriptionAuthentication(auth func(authToken string) (context.Context, error)) + func (engine *Engine) Init() (err error) + func (engine *Engine) NewMutation(resolve interface{}) MutationBuilder + func (engine *Engine) NewQuery(resolve interface{}) QueryBuilder + func (engine *Engine) NewSubscription(onSubscribed interface{}) SubscriptionBuilder + func (engine *Engine) PreRegisterInterface(interfacePrototype, modelPrototype interface{}) error + func (engine *Engine) PreRegisterUnion(interfacePrototype interface{}, types ...interface{}) error + func (engine *Engine) RegisterEnum(prototype interface{}) (*graphql.Enum, error) + func (engine *Engine) RegisterInput(prototype interface{}) (*graphql.InputObject, error) + func (engine *Engine) RegisterObject(prototype interface{}) (*graphql.Object, error) + func (engine *Engine) RegisterPlugin(name string, plugin Plugin) + func (engine *Engine) RegisterScalar(prototype interface{}) (*graphql.Scalar, error) + func (engine *Engine) RegisterType(prototype interface{}) (graphql.Type, error) + func (engine *Engine) Schema() graphql.Schema + func (engine *Engine) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (engine *Engine) ServeWebsocket(w http.ResponseWriter, r *http.Request) + type Enum interface + GraphQLEnumDescription func() string + GraphQLEnumValues func() EnumValueMapping + type EnumValue struct + Description string + Value interface{} + type EnumValueMapping map[string]EnumValue + type Error interface + GraphQLErrorExtension func() string + type FastRequestContext interface + GraphQLContextFromFastHTTPRequest func(ctx *fasthttp.RequestCtx) error + type FastResponseContext interface + GraphQLContextToFastHTTPResponse func(ctx *fasthttp.RequestCtx) error + type FieldSelection interface + IsSelected func(fieldNames ...string) bool + type ID interface + GraphQLID func() + type Input interface + GraphQLInputDescription func() string + type Interface interface + GraphQLInterfaceDescription func() string + type IsGraphQLArguments struct + type IsGraphQLInput struct + type IsGraphQLInterface struct + type IsGraphQLObject struct + type MutationBuilder interface + Description func(desc string) MutationBuilder + Name func(name string) MutationBuilder + Tags func(tags ...string) MutationBuilder + WrapWith func(fn interface{}) MutationBuilder + type NameAlterableEnum interface + GraphQLEnumName func() string + type NameAlterableInput interface + GraphQLInputName func() string + type NameAlterableInterface interface + GraphQLInterfaceName func() string + type NameAlterableObject interface + GraphQLObjectName func() string + type NameAlterableScalar interface + GraphQLScalarName func() string + type Object interface + GraphQLObjectDescription func() string + type ObjectDelegation interface + GraphQLObjectDelegation func() interface{} + type Options struct + Debug bool + MultipartParsingBufferSize int64 + Tags bool + Tracing bool + WsSubProtocol string + type Plugin interface + AfterCheckArgumentsStruct func(pluginData interface{}) error + AfterCheckInputStruct func(pluginData interface{}, input *graphql.InputObject) error + AfterCheckObjectStruct func(pluginData interface{}, obj *graphql.Object) error + BeforeCheckArgumentsStruct func(baseType reflect.Type) interface{} + BeforeCheckInputStruct func(baseType reflect.Type) interface{} + BeforeCheckObjectStruct func(baseType reflect.Type) interface{} + CheckArgument func(pluginData interface{}, name string, typ graphql.Type, tag *reflect.StructTag, ...) error + CheckArgumentsEmbeddedField func(pluginData interface{}, field *reflect.StructField) error + CheckInputObjectEmbeddedFieldTags func(pluginData interface{}, field *reflect.StructField) error + CheckInputObjectField func(pluginData interface{}, name string, typ graphql.Type, tag *reflect.StructTag, ...) error + CheckMutationOperation func(operation string, arguments reflect.Type, typ reflect.Type) + CheckObjectEmbeddedFieldTags func(pluginData interface{}, field *reflect.StructField) error + CheckObjectField func(pluginData interface{}, name string, typ graphql.Type, tag *reflect.StructTag, ...) error + CheckQueryOperation func(operation string, arguments reflect.Type, typ reflect.Type) + MatchAndCallArgumentsMethod func(pluginData interface{}, method reflect.Method, prototype reflect.Value) error + MatchAndCallInputObjectMethod func(pluginData interface{}, method reflect.Method, prototype reflect.Value) error + MatchAndCallObjectMethod func(pluginData interface{}, method reflect.Method, prototype reflect.Value) error + type QueryBuilder interface + Description func(desc string) QueryBuilder + Name func(name string) QueryBuilder + Tags func(tags ...string) QueryBuilder + WrapWith func(fn interface{}) QueryBuilder + type RequestContext interface + GraphQLContextFromHTTPRequest func(r *http.Request) error + type RequestContextBeforeCalled interface + GraphQLCheckErrorBeforeCalled func() error + type RequestOptions struct + OperationName string + Query string + Variables map[string]interface{} + type ResponseContext interface + GraphQLContextToHTTPResponse func(w http.ResponseWriter) error + type Scalar interface + GraphQLScalarDescription func() string + GraphQLScalarParseValue func(value interface{}) + GraphQLScalarSerialize func() interface{} + type ScalarWithASTParsing interface + GraphQLScalarParseLiteral func(valueAST ast.Value) + type Subscription interface + Available func() bool + Close func() error + SendData func(data interface{}) error + type SubscriptionBuilder interface + Description func(desc string) SubscriptionBuilder + Name func(name string) SubscriptionBuilder + OnUnsubscribed func(unsubscribed interface{}) SubscriptionBuilder + Tags func(tags ...string) SubscriptionBuilder + WrapWith func(fn interface{}) SubscriptionBuilder + type SubscriptionSession interface + GraphQLSubscriptionSession func() + type Tracing struct + Duration int64 + EndTime time.Time + Execution TracingExecution + Parsing TracingRecord + StartTime time.Time + Validation TracingRecord + Version int + type TracingExecution struct + Resolvers []*TracingResolveRecord + type TracingRecord struct + Duration int64 + StartOffset int64 + type TracingResolveRecord struct + FieldName string + ParentType string + Path []interface{} + ReturnType string + type Upload struct