rubocop-graphql.yml in gitlab-styles-11.0.0 vs rubocop-graphql.yml in gitlab-styles-13.0.0
- old
+ new
@@ -16,13 +16,39 @@
GraphQL/ExtractInputType:
Enabled: false
# Suggests extracting fields with common prefixes to the separate type
GraphQL/ExtractType:
- Enabled: false
+ Enabled: true
+# Enforce use of `graphql_name` in GrahQL types.
+GraphQL/GraphqlName:
+ EnforcedStyle: required
+
# Checks that types are defined with class-based API
GraphQL/LegacyDsl:
+ Enabled: false
+
+# Detects missing max_complexity configuration in schema files.
+# Max complexity is defined in a different way.
+# See https://gitlab.com/gitlab-org/gitlab/-/blob/9c0dfedd80ede7dbdcc92cf3f5b14bf36998e85c/app/graphql/gitlab_schema.rb#L41-44
+GraphQL/MaxComplexitySchema:
+ Enabled: false
+
+# Detects missing max_depth configuration in schema files.
+# Max depth is defined in a different way.
+# See https://gitlab.com/gitlab-org/gitlab/-/blob/9c0dfedd80ede7dbdcc92cf3f5b14bf36998e85c/app/graphql/gitlab_schema.rb#L41-45
+GraphQL/MaxDepthSchema:
+ Enabled: false
+
+# Detects types that implement Node interface and not have `.authorized?` check.
+# `authorize` is used instead.
+GraphQL/NotAuthorizedNodeType:
+ Enabled: false
+
+# Checks that GraphQL Argument definitions prepare arguments to allow better Sorbet typing.
+# Sorbet is not (yet) used.
+GraphQL/PrepareMethod:
Enabled: false
# Ensures all types have a description
# Disabled because our bespoke Graphql/Descriptions cop covers this.
GraphQL/ObjectDescription: