Generates Ecto embedded schema modules for GraphQL input types.
Unlike TypedGql.TypeGenerator (per-query output types), input types are
schema-level and shared across queries. Each input object type
generates one module under ClientModule.Inputs.InputTypeName.
Generated modules include a build/1 function that validates
parameters via Ecto changeset and returns {:ok, struct} or
{:error, changeset}.
Summary
Functions
Generates input type modules for all input types referenced by an operation's variable definitions.
Generates a Variables struct for an operation's variable definitions.
Types
@type option() :: {:client_module, module()} | {:function_name, atom()} | {:scalar_types, map()} | {:caller_env, Macro.Env.t()}
Functions
@spec generate(TypedGql.Language.OperationDefinition.t(), TypedGql.Schema.t(), [ option() ]) :: [module()]
Generates input type modules for all input types referenced by an operation's variable definitions.
Returns a list of generated module names.
Options
:client_module— the parent client module (e.g.,MyApp.UserService):scalar_types— custom scalar type mappings (default:%{}):caller_env— the macro caller'sMacro.Env, used to set generated modules' source location for editor "go to definition" support
@spec generate_variables( TypedGql.Language.OperationDefinition.t(), TypedGql.Schema.t(), [option()] ) :: module() | nil
Generates a Variables struct for an operation's variable definitions.
Returns the Variables module name, or nil if the operation has no variables.
Variable field names are snake_cased with source: mapping to the original
GraphQL variable name for correct serialization via Ecto.embedded_dump/2.
Options
:client_module— the parent client module:function_name— the defgql function name (for module path):scalar_types— custom scalar type mappings (default:%{}):caller_env— the macro caller'sMacro.Env, used to set generated modules' source location for editor "go to definition" support