From 49a77ddffe0088d4c6ec9461ee58e95307c505f8 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Fri, 17 Jun 2022 11:56:08 +0200 Subject: [PATCH] [graphql] fine tune config to avoid timeout error --- app/graphql/api/v2/schema.rb | 2 +- app/graphql/types/query_type.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/graphql/api/v2/schema.rb b/app/graphql/api/v2/schema.rb index 697a7bdd9..7e0198f50 100644 --- a/app/graphql/api/v2/schema.rb +++ b/app/graphql/api/v2/schema.rb @@ -72,7 +72,7 @@ class API::V2::Schema < GraphQL::Schema use GraphQL::Execution::Interpreter use GraphQL::Analysis::AST - use GraphQL::Schema::Timeout, max_seconds: 10 + use GraphQL::Schema::Timeout, max_seconds: 30 use GraphQL::Batch use GraphQL::Backtrace diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb index 741a7cb17..55b50b79e 100644 --- a/app/graphql/types/query_type.rb +++ b/app/graphql/types/query_type.rb @@ -14,7 +14,7 @@ module Types argument :number, Int, "Numéro du groupe instructeur.", required: true end - field :demarches_publiques, DemarcheDescriptorType.connection_type, null: false, require_admin: true + field :demarches_publiques, DemarcheDescriptorType.connection_type, null: false, require_admin: true, max_page_size: 30 def demarches_publiques Procedure.publiques