graphql

package
v2.31.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NullableBoolField = &graphqlgo.Field{
	Type:    graphqlgo.Boolean,
	Resolve: ResolveNullable,
}

NullableBoolField field for nullable bool

View Source
var NullableDateTimeField = &graphqlgo.Field{
	Type:    graphqlgo.DateTime,
	Resolve: ResolveNullable,
}

NullableTimeField field for nullable datetime

View Source
var NullableFloat64Field = &graphqlgo.Field{
	Type:    graphqlgo.Float,
	Resolve: ResolveNullable,
}

NullableFloat64Field field for nullable float64

View Source
var NullableInt64Field = &graphqlgo.Field{
	Type:    graphqlgo.Int,
	Resolve: ResolveNullable,
}

NullableInt64Field field for nullable int64

View Source
var NullableStringField = &graphqlgo.Field{
	Type:    graphqlgo.String,
	Resolve: ResolveNullable,
}

NullableStringField field for nullable string

Functions

func Init

func Init(opts ...Options)

Init initialize the gql package.

func ResolveNullable

func ResolveNullable(p graphqlgo.ResolveParams) (result interface{}, err error)

ResolveNullable resolve the null field for any type in the struct

Types

type Gql

type Gql struct {
	IsSnakeCase bool
}

Gql defines the variable needed to initialize this package.

type Options

type Options func(*Gql)

Options define the functional options for this package.

func WithSnakeCase

func WithSnakeCase(isSnakeCase bool) Options

WithSnakeCase set if this package use snake case convention.

Jump to

Keyboard shortcuts

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