# TypedGql v0.13.0 - Table of Contents

> Compile-time GraphQL client for Elixir. Validates queries at compilation, generates typed Ecto embedded schemas, and executes via Req.

## Pages

- [Introduction](readme.md)
- [License](license.md)

- Guides
  - [Mapping Custom Scalars](mapping-custom-scalars.md)
  - [Customizing Requests with prepare_req](extending-requests-with-prepare-req.md)

## Modules

- [TypedGql.Generation.Plugins.SkipInclude](TypedGql.Generation.Plugins.SkipInclude.md): Built-in generation plugin for the `@include` and `@skip` directives.
- [TypedStructor.Plugins.Access](TypedStructor.Plugins.Access.md): A `TypedStructor` plugin that implements the `Access` behaviour for structs.

- Core API
  - [TypedGql](TypedGql.md): Compile-time GraphQL client for Elixir.
  - [TypedGql.DecodeError](TypedGql.DecodeError.md): Returned — never raised — when a 2xx GraphQL response carries data the
generated result schema cannot load: an unknown union `__typename`, an
enum value outside the schema, or a scalar of the wrong type.
  - [TypedGql.Error](TypedGql.Error.md): Represents a GraphQL error from the response.
  - [TypedGql.JSON](TypedGql.JSON.md): Behaviour for JSON encoding/decoding.
  - [TypedGql.Macros](TypedGql.Macros.md): The macros a client module gets from `use TypedGql`.
  - [TypedGql.OperationInfo](TypedGql.OperationInfo.md): Tags outgoing requests with their originating `defgql` operation so that
multiple requests can be told apart — most usefully inside `Req.Test` stubs.
  - [TypedGql.Query](TypedGql.Query.md): Represents a compiled GraphQL operation ready for execution.
  - [TypedGql.Result](TypedGql.Result.md): Represents a GraphQL response.

- Type System
  - [TypedGql.EmbeddedSchema](TypedGql.EmbeddedSchema.md): Base module for generated GraphQL embedded schemas.
  - [TypedGql.InputTypeGenerator](TypedGql.InputTypeGenerator.md): Generates Ecto embedded schema modules for GraphQL input types.
  - [TypedGql.ResponseDecoder](TypedGql.ResponseDecoder.md): Decodes GraphQL JSON response data into typed embedded schema structs.
  - [TypedGql.TypeGenerator](TypedGql.TypeGenerator.md): Generates EctoTypedSchema embedded schema modules from GraphQL query AST.
  - [TypedGql.TypeMapper](TypedGql.TypeMapper.md): Maps GraphQL type references to Ecto schema types.
  - [TypedGql.Types.DateTime](TypedGql.Types.DateTime.md): Ecto Type for GraphQL DateTime custom scalar.
  - [TypedGql.Types.Enum](TypedGql.Types.Enum.md): Parameterized Ecto Type for GraphQL enum types.
  - [TypedGql.Types.PathSegment](TypedGql.Types.PathSegment.md): Ecto Type for GraphQL error path segments.
  - [TypedGql.Types.Typename](TypedGql.Types.Typename.md): Parameterized Ecto Type for GraphQL `__typename` fields.
  - [TypedGql.Types.Union](TypedGql.Types.Union.md): Dynamic parameterized Ecto Type for GraphQL union/interface types.
  - [TypedGql.VariablesDumper](TypedGql.VariablesDumper.md): Dumps a variables struct to wire JSON, keeping only the keys the caller
actually provided.

- Generation Plugins
  - [TypedGql.Generation.Context](TypedGql.Generation.Context.md): Read-only context passed to `TypedGql.Generation.Plugin` callbacks.
  - [TypedGql.Generation.Field](TypedGql.Generation.Field.md): A single generated schema field, before lowering to EctoTypedSchema AST.
  - [TypedGql.Generation.Plugin](TypedGql.Generation.Plugin.md): Behaviour for hooking into the response-type generation pipeline.
  - [TypedGql.Generation.Schema](TypedGql.Generation.Schema.md): A node in the generated-schema tree, built by the resolve step before
lowering to EctoTypedSchema AST.

- GraphQL AST
  - [TypedGql.Language](TypedGql.Language.md): The abstract syntax tree of a parsed GraphQL document.
  - [TypedGql.Language.Argument](TypedGql.Language.Argument.md): A single argument supplied to a field or a directive.

  - [TypedGql.Language.BooleanValue](TypedGql.Language.BooleanValue.md): A `true` or `false` literal.

  - [TypedGql.Language.Directive](TypedGql.Language.Directive.md): A directive applied to a node, written `@name(...)`.

  - [TypedGql.Language.DirectiveDefinition](TypedGql.Language.DirectiveDefinition.md): A `directive @name on ...` definition: where a custom directive may be
applied and whether it may repeat.

  - [TypedGql.Language.Document](TypedGql.Language.Document.md): A parsed GraphQL document: the root of the tree, holding every operation,
fragment and type definition the source declared.

  - [TypedGql.Language.EnumTypeDefinition](TypedGql.Language.EnumTypeDefinition.md): An `enum` definition: the set of named values the type admits.

  - [TypedGql.Language.EnumValue](TypedGql.Language.EnumValue.md): An unquoted enum member literal, such as `ACTIVE`.

  - [TypedGql.Language.EnumValueDefinition](TypedGql.Language.EnumValueDefinition.md): A single member declared by an enum type definition.

  - [TypedGql.Language.Field](TypedGql.Language.Field.md): A field selection: a name, optional alias, arguments, directives and
sub-selections.

  - [TypedGql.Language.FieldDefinition](TypedGql.Language.FieldDefinition.md): A field declared on an object or interface type, with the arguments it
accepts and the type it returns.

  - [TypedGql.Language.FloatValue](TypedGql.Language.FloatValue.md): A float literal.

  - [TypedGql.Language.Fragment](TypedGql.Language.Fragment.md): A named fragment definition: a type condition and the selections it
contributes wherever it is spread.

  - [TypedGql.Language.FragmentSpread](TypedGql.Language.FragmentSpread.md): A spread of a named fragment into a selection set, written `...Name`.

  - [TypedGql.Language.InlineFragment](TypedGql.Language.InlineFragment.md): An inline fragment: an optional type condition and the selections it guards.

  - [TypedGql.Language.InputObjectTypeDefinition](TypedGql.Language.InputObjectTypeDefinition.md): An `input` definition: an object type usable only as an argument or
variable value.

  - [TypedGql.Language.InputValueDefinition](TypedGql.Language.InputValueDefinition.md): An input position — an argument or an input object field — with the type it
accepts and the default it falls back to.

  - [TypedGql.Language.IntValue](TypedGql.Language.IntValue.md): An integer literal.

  - [TypedGql.Language.InterfaceTypeDefinition](TypedGql.Language.InterfaceTypeDefinition.md): An `interface` definition: the fields every implementing type must provide.

  - [TypedGql.Language.ListType](TypedGql.Language.ListType.md): A list type, written `[Type]`.

  - [TypedGql.Language.ListValue](TypedGql.Language.ListValue.md): A list literal, written `[...]`.

  - [TypedGql.Language.NamedType](TypedGql.Language.NamedType.md): A type referred to by name, such as `User`.

  - [TypedGql.Language.NonNullType](TypedGql.Language.NonNullType.md): A non-null type, written `Type!`.

  - [TypedGql.Language.NullValue](TypedGql.Language.NullValue.md): The `null` literal.

  - [TypedGql.Language.ObjectField](TypedGql.Language.ObjectField.md): A single name/value pair inside an input object literal.

  - [TypedGql.Language.ObjectTypeDefinition](TypedGql.Language.ObjectTypeDefinition.md): A `type` definition: a concrete object type, the interfaces it implements
and the fields it exposes.

  - [TypedGql.Language.ObjectValue](TypedGql.Language.ObjectValue.md): An input object literal, written `{...}`.

  - [TypedGql.Language.OperationDefinition](TypedGql.Language.OperationDefinition.md): A query, mutation or subscription operation, whether written with the
operation keyword or in the shorthand selection-set form.

  - [TypedGql.Language.ScalarTypeDefinition](TypedGql.Language.ScalarTypeDefinition.md): A `scalar` definition, introducing a leaf type whose representation the
service decides.

  - [TypedGql.Language.SchemaDeclaration](TypedGql.Language.SchemaDeclaration.md): A `schema { ... }` block declaring which types serve as the query, mutation
and subscription roots.

  - [TypedGql.Language.SelectionSet](TypedGql.Language.SelectionSet.md): A braced block of selections requested from one type.

  - [TypedGql.Language.Source](TypedGql.Language.Source.md): The raw GraphQL text a document was parsed from, and the label used for it
when reporting errors.

  - [TypedGql.Language.StringValue](TypedGql.Language.StringValue.md): A string literal, from either the quoted or the block-string form.

  - [TypedGql.Language.TypeExtensionDefinition](TypedGql.Language.TypeExtensionDefinition.md): An `extend` definition, adding members to a type declared elsewhere.

  - [TypedGql.Language.UnionTypeDefinition](TypedGql.Language.UnionTypeDefinition.md): A `union` definition: the set of object types a value of this type may be.

  - [TypedGql.Language.Variable](TypedGql.Language.Variable.md): A use of an operation variable, written `$name`.

  - [TypedGql.Language.VariableDefinition](TypedGql.Language.VariableDefinition.md): A variable declared in an operation's signature, with the type it must
satisfy and the default it falls back to.

- Schema
  - [TypedGql.Schema](TypedGql.Schema.md): A GraphQL schema loaded from an introspection result.
  - [TypedGql.Schema.Directive](TypedGql.Schema.Directive.md): A directive a loaded schema declares, along with the locations it may be
applied to.

  - [TypedGql.Schema.EnumValue](TypedGql.Schema.EnumValue.md): One member of an enum type in a loaded schema.

  - [TypedGql.Schema.Field](TypedGql.Schema.Field.md): A field an object or interface type exposes in a loaded schema.

  - [TypedGql.Schema.InputValue](TypedGql.Schema.InputValue.md): An input position in a loaded schema: a field argument, a directive argument
or an input object field.

  - [TypedGql.Schema.Type](TypedGql.Schema.Type.md): A named type in a loaded schema: object, interface, union, enum, scalar or
input object, with whichever shape its kind gives it.

  - [TypedGql.Schema.TypeRef](TypedGql.Schema.TypeRef.md): A reference to a type in a loaded schema, wrapping a named type in the list
and non-null modifiers that apply to it.

- Formatting
  - [TypedGql.Formatter](TypedGql.Formatter.md): Formatter plugin for the `~GQL` sigil.

## Mix Tasks

- Mix Tasks
  - [mix typed_gql.download_schema](Mix.Tasks.TypedGql.DownloadSchema.md): Downloads a GraphQL schema via introspection and saves it as JSON.

