Documentation
¶
Overview ¶
Package gqlutil holds thin helpers over gqlparser's AST, mirroring the graphql-js type helpers that the TS plugins lean on.
Index ¶
- func BaseType(schema *ast.Schema, t *ast.Type) *ast.Definition
- func IsAbstract(d *ast.Definition) bool
- func IsLeaf(d *ast.Definition) bool
- func IsList(t *ast.Type) bool
- func IsNonNull(t *ast.Type) bool
- func NamedType(t *ast.Type) (name string, nonNull bool)
- func TypeString(t *ast.Type) string
- func UnwrapNonNull(t *ast.Type) *ast.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAbstract ¶
func IsAbstract(d *ast.Definition) bool
IsAbstract reports whether a definition is an interface or union.
func IsLeaf ¶
func IsLeaf(d *ast.Definition) bool
IsLeaf reports whether a definition is a scalar or enum.
func NamedType ¶
NamedType unwraps List and NonNull wrappers to reach the named type, and reports whether the outer type was non-null at the top level.
func TypeString ¶
TypeString renders a type reference back to its SDL form ("String", "[String!]!", "ID", etc.) — graphql-js's String(type).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.