astutil

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterBuiltins

func FilterBuiltins(s *ast.Schema)

FilterBuiltins accepts and mutates an *ast.Schema to remove all built-in types and directives.

func IsBuiltinDirective

func IsBuiltinDirective(name string) bool

IsBuiltinDirective returns true if the given directive name is one of the built-in directives specified here: https://spec.graphql.org/October2021/#sec-Type-System.Directives.Built-in-Directives

@defer is also counted as built-in, despite not appearing in the spec, because it is included in the prelude used by the GraphQL parsing library we're using here: https://github.com/vektah/gqlparser/blob/master/validator/prelude.graphql

func IsBuiltinField

func IsBuiltinField(name string) bool

IsBuiltinField returns true if the given field name is a reserved name (begins with '__').

func IsBuiltinType

func IsBuiltinType(name string) bool

IsBuiltinType returns true if the given type name is either a reserved name (see https://spec.graphql.org/October2021/#sec-Names.Reserved-Names) or one of the specified scalar types in the GraphQL spec here: https://spec.graphql.org/October2021/#sec-Scalars.Built-in-Scalars

Types

This section is empty.

Jump to

Keyboard shortcuts

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