structgraphql

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

README

struct-graphql

Define graphql types using struct. works only with graphql-go.

Usage

parser:= structgraphql.NewParser()
parser.ParseObject

Documentation

Index

Constants

View Source
const (
	TAG_PREFIX   = "graphql"
	TAG_NULLABLE = "nullable"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Defaulted

type Defaulted interface {
	GetDefault() interface{}
}

type Described

type Described interface{ GetDescription() string }

type ID added in v0.0.3

type ID interface {
	IsID() bool
}

type Named

type Named interface{ GetName() string }

type Parser

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

func NewParser

func NewParser() *Parser

func (*Parser) AddEnum

func (parser *Parser) AddEnum(ent interface{}, enum *graphql.Enum)

func (*Parser) AddEnumByValues

func (parser *Parser) AddEnumByValues(ent interface{}, values map[string]interface{})

func (*Parser) AddScalar

func (parser *Parser) AddScalar(ent interface{}, value *graphql.Scalar)

func (*Parser) ParseArgs

func (parser *Parser) ParseArgs(ent interface{}) graphql.FieldConfigArgument

parse all args as a struct

func (*Parser) ParseInput added in v0.0.3

func (parser *Parser) ParseInput(ent interface{}, opts ...interface{}) graphql.Input

func (*Parser) ParseOutput added in v0.0.3

func (parser *Parser) ParseOutput(ent interface{}, opts ...interface{}) graphql.Type

Jump to

Keyboard shortcuts

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