From e7c7292ffdc40e5f19e54a7d0d6e32ab38dd8402 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 9 Mar 2021 13:04:31 +0100 Subject: [PATCH] fix gql query text: Textinterface --- .../graphql/enfr_extension.extension.graphqls | 2 +- .../Plugin/GraphQL/SchemaExtension/EnFrSchemaExtension.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web/modules/custom/enfrancais_graphql/graphql/enfr_extension.extension.graphqls b/src/web/modules/custom/enfrancais_graphql/graphql/enfr_extension.extension.graphqls index 8d81ef0..34209bb 100644 --- a/src/web/modules/custom/enfrancais_graphql/graphql/enfr_extension.extension.graphqls +++ b/src/web/modules/custom/enfrancais_graphql/graphql/enfr_extension.extension.graphqls @@ -7,7 +7,7 @@ extend type Query { } extend type Query { - text(id: Int!): TextInterface + texte(id: Int!): TextInterface } extend type Query { 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 81d0892..95e7c51 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 @@ -143,10 +143,10 @@ class EnFrSchemaExtension extends SdlSchemaExtensionPluginBase { ) ); - $registry->addFieldResolver('Query', 'text', + $registry->addFieldResolver('Query', 'texte', $builder->produce('entity_load') ->map('type', $builder->fromValue('node')) - ->map('id', $builder->fromParent()) + ->map('id', $builder->fromArgument('id')) ); }