graph

package
v0.0.0-...-84b0f7e Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: ISC Imports: 13 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 AccountEdgeResolver

type AccountEdgeResolver interface {
	Cursor(ctx context.Context, obj *ent.AccountEdge) (string, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Account struct {
		EmailAddress func(childComplexity int) int
		ID           func(childComplexity int) int
	}

	AccountConnection struct {
		Edges func(childComplexity int) int
	}

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

	Organization struct {
		Accounts func(childComplexity int) int
		ID       func(childComplexity int) int
		Name     func(childComplexity int) int
	}

	OrganizationConnection struct {
		Edges func(childComplexity int) int
	}

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

	Query struct {
		Me    func(childComplexity int) int
		Node  func(childComplexity int, id pulid.ID) int
		Nodes func(childComplexity int, ids []*pulid.ID) int
		Org   func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type OrganizationEdgeResolver

type OrganizationEdgeResolver interface {
	Cursor(ctx context.Context, obj *ent.OrganizationEdge) (string, error)
}

type OrganizationResolver

type OrganizationResolver interface {
	Accounts(ctx context.Context, obj *ent.Organization) (*ent.AccountConnection, error)
}

type QueryResolver

type QueryResolver interface {
	Node(ctx context.Context, id pulid.ID) (ent.Noder, error)
	Nodes(ctx context.Context, ids []*pulid.ID) ([]ent.Noder, error)
	Me(ctx context.Context) (*ent.Account, error)
	Org(ctx context.Context) (*ent.Organization, error)
}

type Resolver

type Resolver struct {
	Client *ent.Client
}

func (*Resolver) AccountEdge

func (r *Resolver) AccountEdge() AccountEdgeResolver

AccountEdge returns AccountEdgeResolver implementation.

func (*Resolver) Organization

func (r *Resolver) Organization() OrganizationResolver

Organization returns OrganizationResolver implementation.

func (*Resolver) OrganizationEdge

func (r *Resolver) OrganizationEdge() OrganizationEdgeResolver

OrganizationEdge returns OrganizationEdgeResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	AccountEdge() AccountEdgeResolver
	Organization() OrganizationResolver
	OrganizationEdge() OrganizationEdgeResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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