mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
docs: move API -> Domain change to the top of upgrade doc (#971)
This commit is contained in:
parent
d4fcc7565b
commit
f86c7f971b
1 changed files with 11 additions and 13 deletions
|
@ -19,6 +19,17 @@ This section contains each breaking change, and the steps required to address it
|
||||||
|
|
||||||
If you use `Ash.Flow`, include `{:ash_flow, "~> 0.1.0"}` in your application.
|
If you use `Ash.Flow`, include `{:ash_flow, "~> 0.1.0"}` in your application.
|
||||||
|
|
||||||
|
### Ash.Api is now Ash.Domain
|
||||||
|
|
||||||
|
The previous name was often confusing as this is an overloaded term for many. To that end, `Ash.Api` has been renamed to `Ash.Domain`, which better fits our usage and concepts.
|
||||||
|
|
||||||
|
#### What you'll need to change
|
||||||
|
|
||||||
|
To make this change you will need to do two things:
|
||||||
|
|
||||||
|
1. replace `Ash.Api` with `Ash.Domain` in your application
|
||||||
|
2. replace places where an `:api` option is passed to a function with the `:domain` option. For example, `AshPhoenix.Form.for_create(..., api: MyApp.SomeApi)` should now be `AshPhoenix.Form.for_create(..., domain: MyApp.SomeDomain)`
|
||||||
|
|
||||||
### DSL Changes
|
### DSL Changes
|
||||||
|
|
||||||
- `code_interface.define_for` is now `code_interface.domain`. Additionally, it is set automatically if the `domain` option is specified on `use Ash.Resource`.
|
- `code_interface.define_for` is now `code_interface.domain`. Additionally, it is set automatically if the `domain` option is specified on `use Ash.Resource`.
|
||||||
|
@ -161,19 +172,6 @@ Additionally, the following exceptions have had keys remapped:
|
||||||
|
|
||||||
## Significant Changes
|
## Significant Changes
|
||||||
|
|
||||||
### Ash.Api is now Ash.Domain
|
|
||||||
|
|
||||||
The previous name was often confusing as this is an overloaded term for many. To that end, `Ash.Api` has been renamed to `Ash.Domain`, which better fits our usage and concepts.
|
|
||||||
|
|
||||||
#### What you'll need to change
|
|
||||||
|
|
||||||
To make this change you will need to do two things:
|
|
||||||
|
|
||||||
1. replace `Ash.Api` with `Ash.Domain` in your application
|
|
||||||
2. replace places where an `:api` option is passed to a function with the `:domain` option. For example, `AshPhoenix.Form.for_create(..., api: MyApp.SomeApi)` should now be `AshPhoenix.Form.for_create(..., domain: MyApp.SomeDomain)`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### the `Domain` of a resource must now be known when constructing a changeset, query or action input
|
### the `Domain` of a resource must now be known when constructing a changeset, query or action input
|
||||||
|
|
||||||
In order to honor rules on the `Domain` module about authorization and timeouts, we have to know the `Domain` when building the changeset.
|
In order to honor rules on the `Domain` module about authorization and timeouts, we have to know the `Domain` when building the changeset.
|
||||||
|
|
Loading…
Reference in a new issue