cmd

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(config *Config) error

Types

type Config

type Config struct {
	// Get this schema from a remote GraphQL endpoint.
	Url string

	// Send the provided headers to the endpoint.
	// Does nothing if Url is empty.
	Headers http.Header

	// The package directories to fetch source files from.
	Source []string

	// The directory where the generated file goes.
	Target string

	// Name for the generated package.
	// Defaults to the directory name.
	PackageName string

	// The file name to write to.
	// Defaults to "graphql.go"
	FileName string

	// A mapping from custom scalar type to underlying
	// golang type for custom scalars. Otherwise defaults
	// to "string".
	ScalarMap map[string]string

	// Whether to generate {Scalar}Ref() methods to conveniently
	// generate scalar pointers for input objects that need them.
	ScalarRefHelpers bool

	// Whether to generate nullable type wrappers for each input
	// type.
	NullableInputTypes bool
}

func InitConfig

func InitConfig(fromDir string) (Config, error)

Jump to

Keyboard shortcuts

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