You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/changesets/releases.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,17 @@ desc: Associating changes to version numbers
9
9
index: 3
10
10
---
11
11
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
+
classMyAppSchema < 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:
13
23
14
24
```ruby
15
25
classMyAppSchema < GraphQL::Schema
@@ -20,7 +30,7 @@ class MyAppSchema < GraphQL::Schema
20
30
end
21
31
```
22
32
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.
0 commit comments