File tree Expand file tree Collapse file tree
src/Plugin/GraphQL/DataProducer/EntityDefinition/Fields
tests/src/Kernel/DataProducer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function resolve(FieldDefinitionInterface $entity_definition_field): bool
3838 if ($ entity_definition_field instanceof FieldStorageDefinitionInterface) {
3939 return $ entity_definition_field ->isMultiple ();
4040 }
41- return $ entity_definition_field ->isList ();
41+ return $ entity_definition_field ->getFieldStorageDefinition ()-> isMultiple ();
4242 }
4343
4444}
Original file line number Diff line number Diff line change 33namespace Drupal \Tests \graphql \Kernel \DataProducer ;
44
55use Drupal \Core \Entity \Entity \EntityFormDisplay ;
6+ use Drupal \Core \Field \FieldStorageDefinitionInterface ;
67use Drupal \field \Entity \FieldConfig ;
78use Drupal \field \Entity \FieldStorageConfig ;
89use Drupal \Tests \graphql \Kernel \GraphQLTestBase ;
@@ -319,7 +320,7 @@ class EntityDefinitionTest extends GraphQLTestBase {
319320 'type ' => 'text ' ,
320321 'required ' => FALSE ,
321322 'multiple ' => TRUE ,
322- 'maxNumItems ' => 1 ,
323+ 'maxNumItems ' => - 1 ,
323324 'status ' => TRUE ,
324325 'defaultValue ' => NULL ,
325326 'isReference ' => FALSE ,
@@ -346,6 +347,7 @@ public function setUp(): void {
346347 'field_name ' => 'field_test ' ,
347348 'type ' => 'text ' ,
348349 'entity_type ' => 'node ' ,
350+ 'cardinality ' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED ,
349351 ]);
350352 $ field_storage ->save ();
351353
You can’t perform that action at this time.
0 commit comments