#Provider mutations with entities containing relations

3 messages · Page 1 of 1 (latest)

hybrid spade
#

Hi,

I’m implementing a full mutation with three entities (shoppable, consumable, and component) in my custom provider. The component entity depends on shoppable and consumable, as it includes a relation to both. Ideally, I’d like component to be processed last, after shoppable and consumable have been registered.

Despite sorting the entities in the correct order, as shown in the attached screenshots, the processor still processes component first. This results in an error when trying to emit the relation, as its dependencies haven’t been registered yet.

I’ve attached two screenshots that detail the implementation of the connect method for reference.

teal nymph
#

You can't, by intentional design. Relations are explicitly meant to be allowed to be "dangling" - that should not be a hard error

#

The processing order is completely stochastic, happening in a distributed fashion in a cloud of collaborative workers