Open Eduardo-Morales-Alberti opened 4 years ago
Hey @Eduardo-Morales-Alberti,
I hope you have solved this problem in the meantime but if not: it sounds like your custom data producers are returning values from a Drupal loader of some sort directly. The loader is returning FALSE
which causes the GraphQL module to call field resolvers on the values. Ensuring that FALSE
is correctly translated to NULL
will ensure that the later field resolvers are not called and don't throw an error.
I created a query based on the example module, but with a custom entity content with field references. I query all fields, and if the references exists there are no problem, but when try to query an entity that does not have references the following errors are showed.
Documentation: Example based on https://github.com/drupal-graphql/graphql/blob/8.x-4.x/examples/src/Plugin/GraphQL/DataProducer/QueryArticles.php