Skip to content

Commit

Permalink
fix graphql complexirty
Browse files Browse the repository at this point in the history
  • Loading branch information
johnf committed Dec 24, 2024
1 parent f1e72b5 commit 8deb691
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/graphql_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def execute
context = {
current_user:
}
result = NabuSchema.execute(query, variables: variables, context: context, operation_name: operation_name, max_complexity: 200)
result = NabuSchema.execute(query, variables: variables, context: context, operation_name: operation_name, max_complexity: 300)
render json: result
rescue StandardError => error
raise error unless Rails.env.development?
Expand Down
2 changes: 0 additions & 2 deletions app/graphql/nabu_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ class NabuSchema < GraphQL::Schema
mutation(Types::MutationType)
query(Types::QueryType)

max_complexity 300

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

Expand Down

0 comments on commit 8deb691

Please sign in to comment.