# `Ash.Context`
[🔗](https://github.com/ash-project/ash/blob/v3.23.1/lib/ash/context.ex#L5)

Functions for working with the context provided to various callbacks in Ash.

# `context_keyword_list`

```elixir
@type context_keyword_list() :: [
  actor: Ash.Resource.t(),
  authorize?: boolean(),
  tracer: Ash.Tracer.t(),
  tenant: Ash.Resource.t()
]
```

# `to_opts`

> This function is deprecated. Use `Ash.Scope.to_opts/2` instead.

```elixir
@spec to_opts(Ash.Scope.t(), Keyword.t()) :: context_keyword_list()
```

Copies keys from the given context map into a keyword list. Does *not* copy the `:domain` key.

Keys copied:

* `:actor`
* `:authorize?`
* `:tracer`
* `:tenant`
* `context[:shared]` -> `:context`

---

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