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')) ); }