Skip to content

Commit 9ecc20e

Browse files
author
Robert Mosolgo
authored
Merge pull request #3491 from danielvdao/patch-2
Update class_based_api.md with finding legacy members
2 parents a5688e2 + 3492326 commit 9ecc20e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

guides/schema/class_based_api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ In general, each `.define { ... }` block will be converted to a class.
5151

5252
See sections below for specific information about each schema definition class.
5353

54+
### Note: Finding legacy members
55+
As of https://github.com/DmitryTsepelev/rubocop-graphql/pull/39, [rubocop-graphql](https://github.com/DmitryTsepelev/rubocop-graphql) supports a rule to find legacy DSL classes! You can install the gem and require it in your `.rubocop.yml` file.
56+
57+
An example command to find violating files would then be:
58+
59+
```$ rubocop --format files --only GraphQL/LegacyDsl app >> violating_files.txt```
60+
5461
### ⚠️ Heads up ⚠️
5562

5663
Keep in mind that class based Schemas will be initialized at execution time instead of application boot, depending on the size of your schema, this could result in request timeouts for your users after your application restarts. For a workaround please check https://github.com/rmosolgo/graphql-ruby/issues/2034

0 commit comments

Comments
 (0)