馃寠 A GraphQL implementation in Gleam
Changelog#
2.1.4#
Fixed#
- Variables are now preserved when executing nested object and list selections. Previously, variables were lost when traversing into nested contexts, causing variable references in nested fields to resolve as empty.
2.1.3#
Fixed#
- Union type resolution now works for fields wrapped in NonNull (e.g.,
NonNull(UnionType)). Previously, the executor only checked for bareUnionType, missing cases where unions were wrapped.
2.1.2#
Fixed#
- Union type resolution now uses a canonical type registry, ensuring resolved types have complete field definitions
- Made
build_type_mappublic in introspection module for building type registries - Added
get_union_type_resolverto extract the type resolver function from union types - Added
resolve_union_type_with_registryfor registry-based union resolution
2.1.1#
Fixed#
- Inline fragments on union types within arrays now resolve correctly (was skipping union type resolution for
List[NonNull[Union]]items) - Union types are now always traversed during introspection on first encounter, ensuring their
possibleTypesare properly collected
2.1.0#
Added#
- Argument type validation: list arguments now produce helpful errors when passed objects instead of lists
isOneOffield in type introspection for INPUT_OBJECT types (GraphQL spec compliance)- Introspection types are now returned in alphabetical order by name
2.0.0#
Added#
- Support for variable default values (
$name: Type = defaultValue) - Default values are applied during execution when variables are not provided
- Provided variables override default values
- New
schema.named_type_namefunction to get the base type name without List/NonNull wrappers
Fixed#
- Integer and float literal arguments are now correctly converted to
value.Intandvalue.Floatinstead ofvalue.String - Fragment spread type condition matching now works correctly when parent type is wrapped in NonNull or List
- Inline fragment type condition matching now works correctly with wrapped types
__typenameintrospection now returns the concrete type name without modifiers
Breaking Changes#
Variabletype now has 3 fields:Variable(name, type_, default_value)instead of 2- Code pattern matching on
Variablemust be updated to include the third field - Migration: Add
Noneor_as the third argument when constructing or matchingVariable
1.1.0#
Added#
- Support for list types in variable definitions (
[Type],[Type!],[Type]!,[Type!]!)
1.0.1#
- Initial release