File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
spec/requests/graphql/query Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3+ # rubocop:disable GraphQL/MaxComplexitySchema
34class 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 )
Original file line number Diff line number Diff line change 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
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) {
You can’t perform that action at this time.
0 commit comments