From 67c9f1f46bfa2b28f07ec7ea513b9a1319b868c9 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 21 Sep 2021 21:36:59 +0200 Subject: [PATCH] added field_menu_burger to static gql queries --- .../graphql/enfr_extension.base.graphqls | 1 + .../Plugin/GraphQL/SchemaExtension/EnFrSchemaExtension.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/web/modules/custom/enfrancais_graphql/graphql/enfr_extension.base.graphqls b/src/web/modules/custom/enfrancais_graphql/graphql/enfr_extension.base.graphqls index 5ffbc49..c11edfb 100644 --- a/src/web/modules/custom/enfrancais_graphql/graphql/enfr_extension.base.graphqls +++ b/src/web/modules/custom/enfrancais_graphql/graphql/enfr_extension.base.graphqls @@ -102,6 +102,7 @@ type Static implements NodeInterface { texte: String notes: [Noteprod] fichiers: [File] + burger: Boolean poid: Int } diff --git a/src/web/modules/custom/enfrancais_graphql/src/Plugin/GraphQL/SchemaExtension/EnFrSchemaExtension.php b/src/web/modules/custom/enfrancais_graphql/src/Plugin/GraphQL/SchemaExtension/EnFrSchemaExtension.php index db63fde..b4e688a 100644 --- a/src/web/modules/custom/enfrancais_graphql/src/Plugin/GraphQL/SchemaExtension/EnFrSchemaExtension.php +++ b/src/web/modules/custom/enfrancais_graphql/src/Plugin/GraphQL/SchemaExtension/EnFrSchemaExtension.php @@ -845,6 +845,13 @@ class EnFrSchemaExtension extends SdlSchemaExtensionPluginBase { ->map('field', $builder->fromValue('field_notes')) ); + $registry->addFieldResolver('Static', 'burger', + $builder->produce('property_path') + ->map('type', $builder->fromValue('entity:node')) + ->map('value', $builder->fromParent()) + ->map('path', $builder->fromValue('field_menu_burger.value')) + ); + $registry->addFieldResolver('Static', 'poid', $builder->produce('property_path') ->map('type', $builder->fromValue('entity:node'))