Type-safe GraphQL client generator for Gleam
Changelog#
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.1.2] - 2025-11-26#
Changed#
- Updated dependencies: gleam_json 3.1.0, gleeunit 1.9.0, simplifile 2.3.1, splitter 1.2.0, swell 1.1.0
[1.1.1] - 2025-11-12#
Changed#
- Renamed
registrymodule tounstable_registry- The cache registry module is experimental
[1.1.0] - 2025-11-12#
Added#
- Relay-style cache normalization support via new
unstable-cachecommand- Injects
__typenameinto queries for cache entity identification - Generates cache registry with all queries for centralized cache management
- Extracts GraphQL queries from doc comments in
.gleamfiles - Outputs generated types to
src/generated/queries/by default
- Injects
- Enum support
- Generates enum type definitions with PascalCase variants
- Creates
enum_to_string()converter functions for serialization - Generates
enum_decoder()functions for deserialization - Support for enums in response types, variables, and InputObjects
- Support for optional enums (
Option(EnumType)) - Support for lists of enums (
List(EnumType))
Fixed#
- Enum serialization in response types - Response serializers now correctly convert enum values to strings using generated
enum_to_string()functions instead of attempting direct string conversion - Enum serialization in optional fields - Optional enum fields now properly serialize with
json.nullablewrapper - Enum serialization in lists - Lists of enums now correctly serialize each enum value to a string
Changed#
- Removed
output_pathparameter fromunstable-cachecommand - Output path is now fixed atsrc/generatedfor consistency
Commands#
New: unstable-cache#
gleam run -m squall unstable-cache <endpoint>
Extracts GraphQL queries from doc comments and generates:
- Type-safe Gleam functions for each query at
src/generated/queries/ - Cache registry initialization module at
src/generated/queries.gleam - Automatic
__typenameinjection for cache normalization
[1.0.1] - 2025-11-10#
Added#
- Lustre example application
- Fragment support in queries
Changed#
- Updated description
- Updated README
- Removed unused dependencies
[1.0.0] - 2025-11-07#
Initial release with core functionality:
- Sans-IO GraphQL client generation
- Support for both Erlang and JavaScript targets
- GraphQL query, mutation, and subscription support
- Variable and argument handling
- InputObject type support
- JSON scalar type mapping
- Response serializers
- Reserved keyword sanitization