Skip to content

Commit d4d886e

Browse files
KnerioCopilot
andcommitted
Update spec/requests/graphql/query/recursive_query_spec.rb
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dario Pranjic <96529060+Knerio@users.noreply.github.com>
1 parent d053077 commit d4d886e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

app/graphql/sagittarius_schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# frozen_string_literal: true
22

3+
# rubocop:disable GraphQL/MaxComplexitySchema
34
class SagittariusSchema < GraphQL::Schema
45
mutation(Types::MutationType)
56
query(Types::QueryType)
67

78
default_max_page_size 50
89
max_depth 20
9-
max_complexity 200
1010
connections.add(ActiveRecord::Relation, Sagittarius::Graphql::StableConnection)
1111

1212
# For batch-loading (see https://graphql-ruby.org/dataloader/overview.html)
1313
use GraphQL::Dataloader
1414

1515
use GraphQL::Schema::AlwaysVisible
1616

17+
# rubocop:enable GraphQL/MaxComplexitySchema
1718
# rubocop:disable Lint/UselessMethodDefinition
1819
# GraphQL-Ruby calls this when something goes wrong while running a query:
1920
def self.type_error(err, context)

spec/requests/graphql/query/recursive_query_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Organization -> Namespace -> Parent (Organization) -> Namespace -> Parent...
1919
nested_levels = 25
2020
nested_query = 'id name'
21-
21+
2222
nested_levels.times do
2323
nested_query = <<~NESTED
2424
id
@@ -56,7 +56,7 @@
5656

5757
context 'with reasonably nested query' do
5858
let(:query) do
59-
# A reasonable query with moderate nesting (depth ~5)
59+
# A reasonable query with moderate nesting (depth ~7-8)
6060
<<~QUERY
6161
query($organizationId: OrganizationID!) {
6262
organization(id: $organizationId) {

0 commit comments

Comments
 (0)