generator

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: Unlicense Imports: 11 Imported by: 0

Documentation

Overview

Where all the magic happens

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructObjectFromPArgs

func ConstructObjectFromPArgs(modelType reflect.Type, p *graphql.ResolveParams) (*interface{}, []reflect.StructField)

Reads out the GraphQL arguments and writes them into a new object. Consider this as a kind of deserialization.

func GenerateGraphQLSchema

func GenerateGraphQLSchema(
	db *database.Database, excludeModels []interface{},
	customQueryFields graphql.Fields, customMutationFields graphql.Fields,
	models ...interface{}) (graphql.Schema, error)

Types

type IDBehavior added in v0.9.0

type IDBehavior int
const (
	// IDBehaviorSkip skips the Id field in input arguments
	IDBehaviorSkip IDBehavior = iota
	// IDBehaviorInclusive includes the Id field in input arguments among other arguments
	IDBehaviorInclusive
	// IDBehaviorExclusive exclusively includes the Id field in input arguments, skipping all others
	IDBehaviorExclusive
)

Jump to

Keyboard shortcuts

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