Replies: 2 comments 1 reply
-
Hi, What you are attempting to do should be possible, so it seems something is set up incorrectly. It's hard for me to say exactly what, based on the info provided so far, but you should check that the GraphQL type is made available to the APIs that are being extended by the custom field. This is a common error - let's say you define the type on your |
Beta Was this translation helpful? Give feedback.
-
Thanks for the hints! I was able to set up the relation. And I guess I will have to build a UI extension in order to populate the field (for instance into a dropdown list), as the relation is pointing to an entity defined in a custom plugin. Is that correct? I copy and paste the relevant documentation extract below:
|
Beta Was this translation helpful? Give feedback.
-
In the spirit of leveraging the amazing Vendure engine as much as possible, we want to create a customField that defines a relation to an entity that is part of a custom plugin implementation.
We understand it is possible to define a relation to a Vendure entity, such as Asset (which has an example in the documentation). However, we've not had success trying to define one for entity from a plugin.
The specific error we encountered was:
[ExceptionHandler] The GraphQL type "XXX" specified by the Customer.YYY custom field does not exist
But we know this GraphQL type XXX does exist. I suspect Vendure attempts to load this XXX type BEFORE loading the plugins, thus resulting in the error. But we can't confirm this indeed is the case.
We would appreciate some advice or ideas on this please. Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions