Versions in this module Expand all Collapse all v0 v0.0.2 Sep 9, 2024 Changes in this version + const Version + var False = &lit + var Now = time.Now + var Null = &lit + var True = &lit + func AddError(ctx context.Context, err error) + func AddErrorf(ctx context.Context, format string, args ...any) + func BuildUnmarshalerMap(unmarshaler ...any) map[reflect.Type]reflect.Value + func CoerceList(v any) []any + func CollectAllFields(ctx context.Context) []string + func DefaultErrorPresenter(ctx context.Context, err error) *gqlerror.Error + func DefaultRecover(_ context.Context, err any) error + func ErrorOnPath(ctx context.Context, err error) error + func GetErrors(ctx context.Context) gqlerror.List + func GetExtension(ctx context.Context, name string) any + func GetExtensions(ctx context.Context) map[string]any + func GetFieldErrors(ctx context.Context, rctx *FieldContext) gqlerror.List + func GetPath(ctx context.Context) ast.Path + func GetStartTime(ctx context.Context) time.Time + func HasFieldError(ctx context.Context, rctx *FieldContext) bool + func HasOperationContext(ctx context.Context) bool + func Recover(ctx context.Context, err any) (userMessage error) + func RegisterExtension(ctx context.Context, key string, value any) + func StartOperationTrace(ctx context.Context) context.Context + func UnmarshalAny(v any) (any, error) + func UnmarshalBoolean(v any) (bool, error) + func UnmarshalDuration(v any) (time.Duration, error) + func UnmarshalFloat(v any) (float64, error) + func UnmarshalFloatContext(ctx context.Context, v any) (float64, error) + func UnmarshalID(v any) (string, error) + func UnmarshalInputFromContext(ctx context.Context, raw, v any) error + func UnmarshalInt(v any) (int, error) + func UnmarshalInt32(v any) (int32, error) + func UnmarshalInt64(v any) (int64, error) + func UnmarshalIntID(v any) (int, error) + func UnmarshalMap(v interface{}) (map[string]interface{}, error) + func UnmarshalString(v any) (string, error) + func UnmarshalTime(v any) (time.Time, error) + func UnmarshalUUID(v any) (uuid.UUID, error) + func UnmarshalUint(v any) (uint, error) + func UnmarshalUint32(v any) (uint32, error) + func UnmarshalUint64(v any) (uint64, error) + func UnmarshalUintID(v any) (uint, error) + func WithFieldContext(ctx context.Context, rc *FieldContext) context.Context + func WithFreshResponseContext(ctx context.Context) context.Context + func WithOperationContext(ctx context.Context, rc *OperationContext) context.Context + func WithPathContext(ctx context.Context, fic *PathContext) context.Context + func WithResponseContext(ctx context.Context, presenterFunc ErrorPresenterFunc, recoverFunc RecoverFunc) context.Context + func WithRootFieldContext(ctx context.Context, rc *RootFieldContext) context.Context + func WithUnmarshalerMap(ctx context.Context, maps map[reflect.Type]reflect.Value) context.Context + type Array []Marshaler + func (a Array) MarshalGQL(writer io.Writer) + type Cache interface + Add func(ctx context.Context, key string, value T) + Get func(ctx context.Context, key string) (value T, ok bool) + type CollectedField struct + Deferrable *Deferrable + Selections ast.SelectionSet + func CollectFields(reqCtx *OperationContext, selSet ast.SelectionSet, satisfies []string) []CollectedField + func CollectFieldsCtx(ctx context.Context, satisfies []string) []CollectedField + type ContextMarshaler interface + MarshalGQLContext func(ctx context.Context, w io.Writer) error + func MarshalFloatContext(f float64) ContextMarshaler + type ContextUnmarshaler interface + UnmarshalGQLContext func(ctx context.Context, v any) error + type ContextWriterFunc func(ctx context.Context, writer io.Writer) error + func (f ContextWriterFunc) MarshalGQLContext(ctx context.Context, w io.Writer) error + type Deferrable struct + Label string + type DeferredGroup struct + Context context.Context + FieldSet *FieldSet + Label string + Path ast.Path + type DeferredResult struct + Errors gqlerror.List + Label string + Path ast.Path + Result Marshaler + type Empty struct + func (e Empty) MarshalGQL(_ io.Writer) + func (e Empty) MarshalGQLContext(_ context.Context, _ io.Writer) error + type ErrorPresenterFunc func(ctx context.Context, err error) *gqlerror.Error + type ExecutableSchema interface + Complexity func(typeName, fieldName string, childComplexity int, args map[string]any) (int, bool) + Exec func(ctx context.Context) ResponseHandler + Schema func() *ast.Schema + type ExecutableSchemaMock struct + ComplexityFunc func(typeName string, fieldName string, childComplexity int, args map[string]any) (int, bool) + ExecFunc func(ctx context.Context) ResponseHandler + SchemaFunc func() *ast.Schema + func (mock *ExecutableSchemaMock) Complexity(typeName string, fieldName string, childComplexity int, args map[string]any) (int, bool) + func (mock *ExecutableSchemaMock) ComplexityCalls() []struct{ ... } + func (mock *ExecutableSchemaMock) Exec(ctx context.Context) ResponseHandler + func (mock *ExecutableSchemaMock) ExecCalls() []struct{ ... } + func (mock *ExecutableSchemaMock) Schema() *ast.Schema + func (mock *ExecutableSchemaMock) SchemaCalls() []struct{} + type FieldContext struct + Args map[string]any + Child func(context.Context, CollectedField) (*FieldContext, error) + Field CollectedField + Index *int + IsMethod bool + IsResolver bool + Object string + Parent *FieldContext + Result any + func GetFieldContext(ctx context.Context) *FieldContext + func (r *FieldContext) Path() ast.Path + type FieldInterceptor interface + InterceptField func(ctx context.Context, next Resolver) (res any, err error) + type FieldMiddleware func(ctx context.Context, next Resolver) (res any, err error) + type FieldSet struct + Invalids uint32 + Values []Marshaler + func NewFieldSet(fields []CollectedField) *FieldSet + func (m *FieldSet) AddField(field CollectedField) + func (m *FieldSet) Concurrently(i int, f func(context.Context) Marshaler) + func (m *FieldSet) Dispatch(ctx context.Context) + func (m *FieldSet) MarshalGQL(writer io.Writer) + type FieldStats struct + ArgumentsCompleted time.Time + Completed time.Time + Started time.Time + type GraphExecutor interface + CreateOperationContext func(ctx context.Context, params *RawParams) (*OperationContext, gqlerror.List) + DispatchError func(ctx context.Context, list gqlerror.List) *Response + DispatchOperation func(ctx context.Context, rc *OperationContext) (ResponseHandler, context.Context) + type HandlerExtension interface + ExtensionName func() string + Validate func(schema ExecutableSchema) error + type MapCache map[string]T + func (m MapCache[T]) Add(_ context.Context, key string, value T) + func (m MapCache[T]) Get(_ context.Context, key string) (value T, ok bool) + type Marshaler interface + MarshalGQL func(w io.Writer) + func MarshalAny(v any) Marshaler + func MarshalBoolean(b bool) Marshaler + func MarshalDuration(d time.Duration) Marshaler + func MarshalFloat(f float64) Marshaler + func MarshalID(s string) Marshaler + func MarshalInt(i int) Marshaler + func MarshalInt32(i int32) Marshaler + func MarshalInt64(i int64) Marshaler + func MarshalIntID(i int) Marshaler + func MarshalMap(val map[string]interface{}) Marshaler + func MarshalString(s string) Marshaler + func MarshalTime(t time.Time) Marshaler + func MarshalUUID(id uuid.UUID) Marshaler + func MarshalUint(i uint) Marshaler + func MarshalUint32(i uint32) Marshaler + func MarshalUint64(i uint64) Marshaler + func MarshalUintID(i uint) Marshaler + func MarshalUpload(f Upload) Marshaler + func WrapContextMarshaler(ctx context.Context, m ContextMarshaler) Marshaler + type Mutation struct + type NoCache struct + func (n NoCache[T, T2]) Add(_ context.Context, _ string, _ T2) + func (n NoCache[T, T2]) Get(_ context.Context, _ string) (value T2, ok bool) + type Omittable struct + func OmittableOf[T any](value T) Omittable[T] + func (o *Omittable[T]) UnmarshalJSON(bytes []byte) error + func (o Omittable[T]) IsSet() bool + func (o Omittable[T]) MarshalJSON() ([]byte, error) + func (o Omittable[T]) Value() T + func (o Omittable[T]) ValueOK() (T, bool) + type OperationContext struct + DisableIntrospection bool + Doc *ast.QueryDocument + Headers http.Header + Operation *ast.OperationDefinition + OperationName string + RawQuery string + RecoverFunc RecoverFunc + ResolverMiddleware FieldMiddleware + RootResolverMiddleware RootFieldMiddleware + Stats Stats + Variables map[string]any + func GetOperationContext(ctx context.Context) *OperationContext + func (c *OperationContext) Error(ctx context.Context, err error) + func (c *OperationContext) Errorf(ctx context.Context, format string, args ...any) + func (c *OperationContext) Recover(ctx context.Context, err any) error + func (c *OperationContext) Validate(ctx context.Context) error + type OperationContextMutator interface + MutateOperationContext func(ctx context.Context, rc *OperationContext) *gqlerror.Error + type OperationHandler func(ctx context.Context) ResponseHandler + type OperationInterceptor interface + InterceptOperation func(ctx context.Context, next OperationHandler) ResponseHandler + type OperationMiddleware func(ctx context.Context, next OperationHandler) ResponseHandler + type OperationParameterMutator interface + MutateOperationParameters func(ctx context.Context, request *RawParams) *gqlerror.Error + type PathContext struct + Field *string + Index *int + Parent *PathContext + ParentField *FieldContext + func GetPathContext(ctx context.Context) *PathContext + func NewPathWithField(field string) *PathContext + func NewPathWithIndex(index int) *PathContext + func (fic *PathContext) Path() ast.Path + type Query struct + type RawParams struct + Extensions map[string]any + Headers http.Header + OperationName string + Query string + ReadTime TraceTiming + Variables map[string]any + func (p *RawParams) AddUpload(upload Upload, key, path string) *gqlerror.Error + type RecoverFunc func(ctx context.Context, err any) (userMessage error) + type RequestContext = OperationContext + func GetRequestContext(ctx context.Context) *RequestContext + type Resolver func(ctx context.Context) (res any, err error) + type ResolverContext = FieldContext + func GetResolverContext(ctx context.Context) *ResolverContext + type Response struct + Data json.RawMessage + Errors gqlerror.List + Extensions map[string]any + HasNext *bool + Label string + Path ast.Path + func ErrorResponse(ctx context.Context, messagef string, args ...any) *Response + type ResponseHandler func(ctx context.Context) *Response + func OneShot(resp *Response) ResponseHandler + type ResponseInterceptor interface + InterceptResponse func(ctx context.Context, next ResponseHandler) *Response + type ResponseMiddleware func(ctx context.Context, next ResponseHandler) *Response + type RootFieldContext struct + Field CollectedField + Object string + func GetRootFieldContext(ctx context.Context) *RootFieldContext + type RootFieldInterceptor interface + InterceptRootField func(ctx context.Context, next RootResolver) Marshaler + type RootFieldMiddleware func(ctx context.Context, next RootResolver) Marshaler + type RootResolver func(ctx context.Context) Marshaler + type Stats struct + OperationStart time.Time + Parsing TraceTiming + Read TraceTiming + Validation TraceTiming + func (c *Stats) GetExtension(name string) any + func (c *Stats) SetExtension(name string, data any) + type Status int + type Subscription struct + type TraceTiming struct + End time.Time + Start time.Time + type Transport interface + Do func(w http.ResponseWriter, r *http.Request, exec GraphExecutor) + Supports func(r *http.Request) bool + type Unmarshaler interface + UnmarshalGQL func(v any) error + type Upload struct + ContentType string + File io.ReadSeeker + Filename string + Size int64 + func UnmarshalUpload(v any) (Upload, error) + type WriterFunc func(writer io.Writer) + func (f WriterFunc) MarshalGQL(w io.Writer)