Skip to content

Commit ea70c48

Browse files
committed
Document changeset_dir
1 parent 9ac99f0 commit ea70c48

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

guides/changesets/releases.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@ desc: Associating changes to version numbers
99
index: 3
1010
---
1111

12-
To be available to clients, Changesets added to the schema with `use GraphQL::Enterprise::Changeset::Release`:
12+
To be available to clients, Changesets added to the schema with `use GraphQL::Enterprise::Changeset::Release changeset_dir: "..."`:
13+
14+
```ruby
15+
class MyAppSchema < GraphQL::Schema
16+
use GraphQL::Enterprise::Changeset::Release, changeset_dir: "app/graphql/changesets"
17+
end
18+
```
19+
20+
This attaches each Changeset defined in `app/graphql/changesets/*.rb` to the schema. (It assumes Rails conventions, where an underscored file like `app/graphql/changesets/add_some_feature.rb` contains a class like `Changesets::AddSomeFeature`.)
21+
22+
Alternatively, Changesets can be explicitly attached using `changesets: [...]`, for example:
1323

1424
```ruby
1525
class MyAppSchema < GraphQL::Schema
@@ -20,7 +30,7 @@ class MyAppSchema < GraphQL::Schema
2030
end
2131
```
2232

23-
Only changesets on the list will be shown to clients. The `release ...` configuration in the changeset will be compared to `context[:changeset_version]` to determine if the changeset applies to the current request.
33+
Only changesets in the directory (or in the array) will be shown to clients. The `release ...` configuration in the changeset will be compared to `context[:changeset_version]` to determine if the changeset applies to the current request.
2434

2535
## Inspecting Releases
2636

0 commit comments

Comments
 (0)