batchresolver

package
v0.0.0-...-983369b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Profile struct {
		ID func(childComplexity int) int
	}

	Query struct {
		Users func(childComplexity int) int
	}

	User struct {
		NonNullableBatch        func(childComplexity int) int
		NonNullableNonBatch     func(childComplexity int) int
		NullableBatch           func(childComplexity int) int
		NullableBatchWithArg    func(childComplexity int, offset int) int
		NullableNonBatch        func(childComplexity int) int
		NullableNonBatchWithArg func(childComplexity int, offset int) int
	}
}

type DirectiveRoot

type DirectiveRoot struct {
}

type Profile

type Profile struct {
	ID string `json:"id"`
}

type Query

type Query struct {
}

type QueryResolver

type QueryResolver interface {
	Users(ctx context.Context) ([]*User, error)
}

type Resolver

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

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

func (*Resolver) User

func (r *Resolver) User() UserResolver

User returns UserResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
	User() UserResolver
}

type User

type User struct {
	NullableBatch           *Profile `json:"nullableBatch,omitempty"`
	NullableNonBatch        *Profile `json:"nullableNonBatch,omitempty"`
	NullableBatchWithArg    *Profile `json:"nullableBatchWithArg,omitempty"`
	NullableNonBatchWithArg *Profile `json:"nullableNonBatchWithArg,omitempty"`
	NonNullableBatch        *Profile `json:"nonNullableBatch"`
	NonNullableNonBatch     *Profile `json:"nonNullableNonBatch"`
}

type UserResolver

type UserResolver interface {
	NullableBatch(ctx context.Context, objs []*User) ([]*Profile, error)
	NullableNonBatch(ctx context.Context, obj *User) (*Profile, error)
	NullableBatchWithArg(ctx context.Context, objs []*User, offset int) ([]*Profile, error)
	NullableNonBatchWithArg(ctx context.Context, obj *User, offset int) (*Profile, error)
	NonNullableBatch(ctx context.Context, objs []*User) ([]*Profile, error)
	NonNullableNonBatch(ctx context.Context, obj *User) (*Profile, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL