# `Incant.Web.API.QueryRequest`
[🔗](https://github.com/elixir-vibe/incant/blob/v0.1.1/lib/incant/web/api/query_request.ex#L1)

Typed request contract for standalone Incant resource queries.

The standalone HTTP API decodes JSON bodies into this struct at the HTTP
boundary before dispatching to the queried resource. Library/embedded
consumers do not interact with this module.

# `t`

```elixir
@type t() :: %Incant.Web.API.QueryRequest{
  context: map(),
  table: Incant.Service.Index.table_state()
}
```

# `cast`

```elixir
@spec cast(map()) :: {:ok, t()} | {:error, {:invalid_request, Exception.t()}}
```

# `cast_table`

```elixir
@spec cast_table(map()) ::
  {:ok, Incant.Service.Index.table_state()}
  | {:error, {:invalid_request, Exception.t()}}
```

# `decode`

Decodes a JSON string into this struct.

# `decode!`

Decodes a JSON string into this struct, raising on failure.

# `dump`

Dumps this struct into JSON-shaped data, respecting JSON field names.

# `from_map`

Builds this struct from a decoded JSON map.

# `from_map!`

Builds this struct from a decoded JSON map, raising on failure.

# `json_schema`

Returns a JSON Schema-compatible schema map.

# `schema`

Returns a JSON Schema-compatible schema map.

# `to_map`

Converts this struct into a JSON-shaped map.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
