schema

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed fastgql.graphql
	FastGQLSchema     string
	FastGQLDirectives = []string{"table", "generate", "relation", "generateFilterInput", "generateMutations"}
)

Functions

func FormatSchema

func FormatSchema(schema *ast.Schema) []*ast.Source

FormatSchema into multiple sources, the original format schema from gqlparser lib saves all in one file, in this case after augmentation we want to keep all original files and structure and all added definitions to put in fastgql.graphql file.

func Generate

func Generate(configPath string, generateServer bool, sources ...*ast.Source) error

Types

type FastGqlPlugin

type FastGqlPlugin struct{}

FastGqlPlugin augments and extends the original schema

func (FastGqlPlugin) CreateAugmented

func (f FastGqlPlugin) CreateAugmented(schema *ast.Schema, augmenters ...augmenters.Augmenter) ([]*ast.Source, error)

CreateAugmented augments *ast.Schema returning []*ast.Source files that are augmented with filters, mutations etc' so gqlgen can generate an augmented fastGQL server

func (FastGqlPlugin) MarkResolvers

func (f FastGqlPlugin) MarkResolvers(c *config.Config) error

MarkResolvers goes over all types and marks any fields that resolver should be created for, theses resolvers are generated by the fastgql resolvergen.Plugin

func (FastGqlPlugin) MutateConfig

func (f FastGqlPlugin) MutateConfig(c *config.Config) error

func (FastGqlPlugin) Name

func (f FastGqlPlugin) Name() string

Directories

Path Synopsis
codegen

Jump to

Keyboard shortcuts

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