codegenapi

package
v0.0.39-alpha9 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultGraphQLMutationName = NounVerb

Variables

This section is empty.

Functions

func GraphQLName

func GraphQLName(cfg Config, name string) string

Types

type Config

type Config interface {
	DefaultGraphQLMutationName() GraphQLMutationName
	DefaultGraphQLFieldFormat() GraphQLFieldFormat
	GetRootPathToConfigs() string
	DebugMode() bool
}

this file exists to simplify circular dependencies

type DummyConfig

type DummyConfig struct {
}

DummyConfig exists for tests/legacy paths which need Configs and don't want to create the production one

func (*DummyConfig) DebugMode

func (cfg *DummyConfig) DebugMode() bool

func (*DummyConfig) DefaultGraphQLFieldFormat

func (cfg *DummyConfig) DefaultGraphQLFieldFormat() GraphQLFieldFormat

func (*DummyConfig) DefaultGraphQLMutationName

func (cfg *DummyConfig) DefaultGraphQLMutationName() GraphQLMutationName

func (*DummyConfig) GetRootPathToConfigs

func (cfg *DummyConfig) GetRootPathToConfigs() string

type GraphQLFieldFormat

type GraphQLFieldFormat string
const (
	LowerCamelCase GraphQLFieldFormat = "lowerCamel"

	SnakeCase GraphQLFieldFormat = "snake_case"
)

type GraphQLMutationName

type GraphQLMutationName string
const (
	// e.g. userCreate. default
	NounVerb GraphQLMutationName = "NounVerb"

	// e.g. createUser
	VerbNoun GraphQLMutationName = "VerbNoun"
)

Jump to

Keyboard shortcuts

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