TypedGql.Language (TypedGql v0.13.0)

Copy Markdown View Source

The abstract syntax tree of a parsed GraphQL document.

Each TypedGql.Language.* module is one node of the GraphQL grammar, and the types below name the alternatives the grammar allows at a given position: a selection, a value, a type reference, or a top-level definition. Generation plugins see these nodes as the query as written, next to the loaded TypedGql.Schema describing what the server actually offers.

Summary

Functions

Every fragment spread name in a selection set, depth first, duplicates kept.

Whether a variable definition's default value can stand in for a missing one.

Types

Functions

spread_names(arg1)

@spec spread_names(TypedGql.Language.SelectionSet.t() | nil) :: [String.t()]

Every fragment spread name in a selection set, depth first, duplicates kept.

usable_default?(arg1)

@spec usable_default?(value_t() | nil) :: boolean()

Whether a variable definition's default value can stand in for a missing one.

nil means the definition declared no default. A NullValue declared one that is null, which satisfies nothing a non-null type promises — so neither makes the variable optional, nor lets it reach a non-null argument.