From 3a98926aba51104bb4dada5bd6650cf31ebfef73 Mon Sep 17 00:00:00 2001 From: Vidar Date: Thu, 7 Nov 2019 14:18:03 +0100 Subject: [PATCH] Store ezplatform_graphql.schema.content.mapping.field_definition_type parameter in compiler pass --- doc/howto/custom_field_type.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/howto/custom_field_type.md b/doc/howto/custom_field_type.md index 1c6250f3..67149d1a 100644 --- a/doc/howto/custom_field_type.md +++ b/doc/howto/custom_field_type.md @@ -58,6 +58,7 @@ class LandingPageGraphQLConfigurationPass implements CompilerPassInterface 'definition_type' => 'MyCustomFieldDefinition', 'value_resolver' => 'field.someProperty' ]; + $container->setParameter('ezplatform_graphql.schema.content.mapping.field_definition_type', $mapping); } } ``` @@ -189,4 +190,4 @@ Two variables are available in the resolver's expression: - `field` is the current field, as an extension of the API's Field object that proxies properties requests to the Field Value - `content` is the resolved content item's `ContentInfo`. -`RelationFieldValueBuilder` or `SelectionFieldValueBuilder` can be used as examples. \ No newline at end of file +`RelationFieldValueBuilder` or `SelectionFieldValueBuilder` can be used as examples.