gql0

package
v0.0.0-...-43a1cd2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 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 {
	Foo struct {
		Bar func(childComplexity int) int
	}

	FooConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	FooEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	PageInfo struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}

	Query struct {
		Bar  func(childComplexity int, a *int, b int, c *int) int
		Baz  func(childComplexity int, ids []string) int
		Bazz func(childComplexity int, ids []string) int
		Foo  func(childComplexity int, a *int, b int, c *int) int
	}
}
var ComplexityFuncs ComplexityRoot = struct {
	Foo struct {
		Bar func(childComplexity int) int
	}
	FooConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}
	FooEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}
	PageInfo struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}
	Query struct {
		Bar  func(childComplexity int, a *int, b int, c *int) int
		Baz  func(childComplexity int, ids []string) int
		Bazz func(childComplexity int, ids []string) int
		Foo  func(childComplexity int, a *int, b int, c *int) int
	}
}{
	Foo: struct {
		Bar func(childComplexity int) int
	}{

		Bar: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 3

			return complexity
		},
	},
	FooConnection: struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}{

		Edges: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 0

			return complexity
		},
		PageInfo: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 0

			return complexity
		},
	},
	FooEdge: struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}{

		Cursor: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 0

			return complexity
		},
		Node: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 0

			return complexity
		},
	},
	PageInfo: struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}{

		EndCursor: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 0

			return complexity
		},
		HasNextPage: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 0

			return complexity
		},
		HasPreviousPage: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 0

			return complexity
		},
		StartCursor: func(childComplexity int) int {
			var complexity int

			complexity = childComplexity + 0

			return complexity
		},
	},
	Query: struct {
		Bar  func(childComplexity int, a *int, b int, c *int) int
		Baz  func(childComplexity int, ids []string) int
		Bazz func(childComplexity int, ids []string) int
		Foo  func(childComplexity int, a *int, b int, c *int) int
	}{

		Bar: func(childComplexity int, a *int, b int, c *int) int {
			var complexity int

			complexity = childComplexity + 0

			if a != nil {
				complexity *= *a
			}

			complexity *= b

			return complexity
		},
		Baz: func(childComplexity int, ids []string) int {
			var complexity int

			complexity = childComplexity + 0

			complexity *= len(ids)

			return complexity
		},
		Bazz: func(childComplexity int, ids []string) int {
			var complexity int

			complexity = childComplexity + 0

			complexity *= len(ids)

			return complexity
		},
		Foo: func(childComplexity int, a *int, b int, c *int) int {
			var complexity int

			complexity = childComplexity + 2

			if a != nil {
				complexity *= *a
			}

			complexity *= b

			return complexity
		},
	},
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type QueryResolver

type QueryResolver interface {
	Foo(ctx context.Context, a *int, b int, c *int) (*model.FooConnection, error)
	Bar(ctx context.Context, a *int, b int, c *int) (*model.FooConnection, error)
	Baz(ctx context.Context, ids []string) (*model.FooConnection, error)
	Bazz(ctx context.Context, ids []string) (*model.FooConnection, error)
}

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

type Stub

type Stub struct {
	QueryResolver struct {
		Foo  func(ctx context.Context, a *int, b int, c *int) (*model.FooConnection, error)
		Bar  func(ctx context.Context, a *int, b int, c *int) (*model.FooConnection, error)
		Baz  func(ctx context.Context, ids []string) (*model.FooConnection, error)
		Bazz func(ctx context.Context, ids []string) (*model.FooConnection, error)
	}
}

func (*Stub) Query

func (r *Stub) Query() QueryResolver

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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