From e74c32446e36fa012fb6f426e86449a960e04ac8 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 12 Nov 2020 15:48:31 +0100 Subject: [PATCH] Fix champ->type_de_champ n+1 --- app/graphql/types/dossier_type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/graphql/types/dossier_type.rb b/app/graphql/types/dossier_type.rb index 341ae242c..55e8716f4 100644 --- a/app/graphql/types/dossier_type.rb +++ b/app/graphql/types/dossier_type.rb @@ -78,7 +78,7 @@ module Types end def champs - Loaders::Association.for(object.class, :champs).load(object) + Loaders::Association.for(object.class, champs: [:type_de_champ]).load(object) end def annotations