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

A domain allows you to interact with your resources, and holds domain-wide configuration.

For example, the json domain extension adds a domain extension that lets you toggle authorization on/off
for all resources in a given domain. You include resources in your domain like so:

```elixir
defmodule MyApp.MyDomain do
  use Ash.Domain

  resources do
    resource OneResource
    resource SecondResource
  end
end
```

### Options

* `:validate_config_inclusion?` (`t:boolean/0`) - Whether or not to validate that this domain is included in the configuration. The default value is `true`.

* `:backwards_compatible_interface?` (`t:boolean/0`) - Whether or not to include the 2.0 backwards compatible interface, which includes all of the interaction functions which are now defined on the `Ash` module The default value is `true`.

* `:extensions` (list of module that adopts `Spark.Dsl.Extension`) - A list of DSL extensions to add to the `Spark.Dsl`

* `:authorizers` (one or a list of module that adopts `Ash.Authorizer`) - authorizers extensions to add to the `Spark.Dsl` The default value is `[]`.

* `:otp_app` (`t:atom/0`) - The otp_app to use for any application configurable options

* `:fragments` (list of `t:module/0`) - Fragments to include in the `Spark.Dsl`. See the fragments guide for more.

# `t`

```elixir
@type t() :: module()
```

---

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