plugins

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddArgumentType

func AddArgumentType(definition *ast.ArgumentDefinition, output *strings.Builder, maybeType string, knownScalars []*ast.Definition)

func AddBaseTypes

func AddBaseTypes(output *strings.Builder)

func AddFieldType

func AddFieldType(definition *ast.FieldDefinition, output *strings.Builder, maybeType string, knownScalars []*ast.Definition)

func AddScalars

func AddScalars(schema *ast.Schema, output *strings.Builder) []*ast.Definition

AddScalars parses a schema and outputs a Scalars type, it also returns a list of scalars it found

func ConvertDefinition

func ConvertDefinition(definition *ast.Definition, output *strings.Builder, knownScalars []*ast.Definition) error

func ConvertEnum

func ConvertEnum(definition *ast.Definition, output *strings.Builder)

func ConvertInputObject

func ConvertInputObject(definition *ast.Definition, output *strings.Builder, knownScalars []*ast.Definition)

func ConvertInterface

func ConvertInterface(definition *ast.Definition, output *strings.Builder, knownScalars []*ast.Definition)

func ConvertObject

func ConvertObject(definition *ast.Definition, output *strings.Builder, knownScalars []*ast.Definition)

func ConvertSchema

func ConvertSchema(schema *ast.Schema, output *strings.Builder)

ConvertSchema converts a graphql schema to Typescript output

func ConvertUnion

func ConvertUnion(definition *ast.Definition, output *strings.Builder)

func ToCamel

func ToCamel(input string) string

func ToUpper

func ToUpper(input string) string

func VerifyPlugin

func VerifyPlugin(pluginName string, config interface{}) error

VerifyPlugin checks if a plugin is executable by faster-graphql-codegen

func WriteArgumentComment

func WriteArgumentComment(definition *ast.ArgumentDefinition, output *strings.Builder)

func WriteComment

func WriteComment(definition *ast.Definition, output *strings.Builder)

func WriteFieldArguments

func WriteFieldArguments(definition *ast.FieldDefinition, output *strings.Builder, knownScalars []*ast.Definition, rootName string)

func WriteFieldComment

func WriteFieldComment(definition *ast.FieldDefinition, output *strings.Builder)

Types

type PluginTask

type PluginTask struct {
	Schema *ast.Schema
	Output *strings.Builder
	Config interface{}
}

func (*PluginTask) Introspect

func (p *PluginTask) Introspect()

func (*PluginTask) Typescript

func (p *PluginTask) Typescript()

Jump to

Keyboard shortcuts

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