scalar

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnmarshall = errors.New("unmarshall error")
)

Functions

This section is empty.

Types

type JSONObject

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

JSONObject is a custom GraphQL type to represent JSONObject.

func NewJSONObject

func NewJSONObject(v map[string]interface{}) *JSONObject

func (JSONObject) ImplementsGraphQLType

func (JSONObject) ImplementsGraphQLType(name string) bool

ImplementsGraphQLType maps this custom Go type to the graphql scalar type in the schema.

func (JSONObject) MarshalJSON

func (t JSONObject) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaler for JSONObject

This function will be called whenever you query for fields that use the JSONObject type.

func (*JSONObject) UnmarshalGraphQL

func (t *JSONObject) UnmarshalGraphQL(input interface{}) error

UnmarshalGraphQL is a custom unmarshaler for JSONObject

This function will be called whenever you use the JSONObject scalar as an input.

type Offset

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

Offset is a custom GraphQL type to represent an offset (large integer with possible negative values).

func NewOffset

func NewOffset(v *big.Int) *Offset

func (Offset) ImplementsGraphQLType

func (Offset) ImplementsGraphQLType(name string) bool

ImplementsGraphQLType maps this custom Go type to the graphql scalar type in the schema.

func (Offset) MarshalJSON

func (t Offset) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaler for Offset

This function will be called whenever you query for fields that use the Offset type.

func (*Offset) UnmarshalGraphQL

func (t *Offset) UnmarshalGraphQL(input interface{}) error

UnmarshalGraphQL is a custom unmarshaler for Offset

This function will be called whenever you use the Offset scalar as an input.

func (Offset) Value

func (t Offset) Value() *big.Int

Value returns the value for this scalar.

Jump to

Keyboard shortcuts

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