gql

package
v0.0.0-...-516dd05 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 14 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 {
	CustomerTokens struct {
		Address        func(childComplexity int) int
		ID             func(childComplexity int) int
		Project        func(childComplexity int) int
		ProjectAddress func(childComplexity int) int
		Slot           func(childComplexity int) int
		TokenID        func(childComplexity int) int
		Value          func(childComplexity int) int
	}

	CustomerTokensDto struct {
		Abi             func(childComplexity int) int
		Address         func(childComplexity int) int
		AssetArea       func(childComplexity int) int
		AssetCarbonUnit func(childComplexity int) int
		ID              func(childComplexity int) int
		Image           func(childComplexity int) int
		MinterAddress   func(childComplexity int) int
		Name            func(childComplexity int) int
		OffseterAddress func(childComplexity int) int
		Slot            func(childComplexity int) int
		Tokens          func(childComplexity int) int
		YielderAddress  func(childComplexity int) int
	}

	CustomerTokensResponse struct {
		Global   func(childComplexity int) int
		Projects func(childComplexity int) int
	}

	DisplayableValue struct {
		DisplayableValue func(childComplexity int) int
		Type             func(childComplexity int) int
		Value            func(childComplexity int) int
	}

	GlobalDeposited struct {
		Total 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
	}

	Project struct {
		Abi             func(childComplexity int) int
		Address         func(childComplexity int) int
		ID              func(childComplexity int) int
		Image           func(childComplexity int) int
		MinterAddress   func(childComplexity int) int
		Name            func(childComplexity int) int
		OffseterAddress func(childComplexity int) int
		Slot            func(childComplexity int) int
		Tokens          func(childComplexity int) int
		YielderAddress  func(childComplexity int) int
	}

	ProjectAbi struct {
		Minter  func(childComplexity int) int
		Project func(childComplexity int) int
	}

	Query struct {
		CustomerTokens func(childComplexity int, address string) int
		Node           func(childComplexity int, id string) int
		Nodes          func(childComplexity int, ids []string) int
	}

	Token struct {
		TokenID func(childComplexity int) int
		Value   func(childComplexity int) int
	}

	ValueItem struct {
		Decimals func(childComplexity int) int
		Symbol   func(childComplexity int) int
		Value    func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type CustomerTokensDto

type CustomerTokensDto struct {
	ID              string            `json:"id"`
	Name            string            `json:"name"`
	Slot            int               `json:"slot"`
	Address         string            `json:"address"`
	MinterAddress   string            `json:"minter_address"`
	YielderAddress  *string           `json:"yielder_address,omitempty"`
	OffseterAddress *string           `json:"offseter_address,omitempty"`
	Abi             *model.ProjectAbi `json:"abi"`
	Image           string            `json:"image"`
	Tokens          []*Token          `json:"tokens,omitempty"`
	AssetArea       string            `json:"asset_area"`
	AssetCarbonUnit string            `json:"asset_carbon_unit"`
}

type CustomerTokensResponse

type CustomerTokensResponse struct {
	Global   *GlobalDeposited     `json:"global"`
	Projects []*CustomerTokensDto `json:"projects,omitempty"`
}

type DirectiveRoot

type DirectiveRoot struct {
}

type DisplayableValueResolver

type DisplayableValueResolver interface {
	Type(ctx context.Context, obj *model.DisplayableValue) (string, error)
}

type GlobalDeposited

type GlobalDeposited struct {
	Total string `json:"total"`
}

type ProjectAbiResolver

type ProjectAbiResolver interface {
	Project(ctx context.Context, obj *model.ProjectAbi) (string, error)
	Minter(ctx context.Context, obj *model.ProjectAbi) (string, error)
}

type QueryResolver

type QueryResolver interface {
	Node(ctx context.Context, id string) (ent.Noder, error)
	Nodes(ctx context.Context, ids []string) ([]ent.Noder, error)
	CustomerTokens(ctx context.Context, address string) (*CustomerTokensResponse, error)
}

type ResolverRoot

type ResolverRoot interface {
	DisplayableValue() DisplayableValueResolver
	ProjectAbi() ProjectAbiResolver
	Query() QueryResolver
	ValueItem() ValueItemResolver
}

type Token

type Token struct {
	TokenID string  `json:"token_id"`
	Value   *string `json:"value,omitempty"`
}

type ValueItemResolver

type ValueItemResolver interface {
	Value(ctx context.Context, obj *model.ValueItem) (string, error)
}

Jump to

Keyboard shortcuts

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