Open alesbencina opened 5 years ago
What worked for me was updating the syntax.
For example
$registry->addFieldResolver('Article', 'tags',
$builder->produce('entity_reference', [
'mapping' => [
'entity' => $builder->fromParent(),
'field' => $builder->fromValue('field_tags'),
],
])
);
should be
$registry->addFieldResolver('Article', 'tags',
$builder->produce('entity_reference')
->map('entity', $builder->fromParent())
->map('field', $builder->fromValue('field_tags'))
);
After updating, I am able to get tags. Update the syntax for every entity type.
{
"data": {
"article": {
"tags": [
{
"name": "flutter"
}
],
"title": "My New Flutter Article"
}
}
}
Greetings,
first of all thank you for contribution.
I have enabled your module and tested it. But I cannot get the tags from article. I always get NULL. Do I do something wrong? What can I do to make it right? Bellow is my schema and resolvers which are already provided in example.