common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFieldIfNotExists

func AppendFieldIfNotExists(fields []*ast.FieldDefinition, field *ast.FieldDefinition) []*ast.FieldDefinition

AppendFieldIfNotExists appends field to fields if it doesn't exist

func ArgsToFields

func ArgsToFields(args ast.ArgumentDefinitionList) ast.FieldList

ArgsToFields converts arguments to fields

func DirectiveToType

func DirectiveToType(directive *ast.DirectiveDefinition, pos *ast.Position) *ast.Definition

DirectiveToType converts directive to type

func FindObjectByResourceName

func FindObjectByResourceName(schema *ast.Schema, name string) *ast.Definition

FindObjectByResourceName finds object by resource name

func GetDefinedObjects

func GetDefinedObjects(schema *ast.Schema, hasDirectives ...string) map[string]*ast.Definition

GetDefinedObjects returns all defined objects in schema

func GetResourceDirectiveSingularType

func GetResourceDirectiveSingularType(schema *ast.Schema, directive *ast.Directive) (*ast.Type, error)

GetResourceDirectiveSingularType returns resource directive singular type

func IsMutationAction

func IsMutationAction(directive *ast.Directive) bool

IsMutationAction checks if directive is mutation action

func IsQueryAction

func IsQueryAction(directive *ast.Directive) bool

IsQueryAction checks if directive is query action

func IsXgenDirectiveDefinition

func IsXgenDirectiveDefinition(directive *ast.DirectiveDefinition) bool

IsXgenDirectiveDefinition checks if directive is xgen directive

Types

This section is empty.

Jump to

Keyboard shortcuts

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