Example:
I receive data in a string that needs to be parsed first, for example an IoT message.
I can create a mutation for that no problem, I’m just storing a string in a DB, however, based on what was in the string, I then save data of very different types, so I will have a switch statement in the resolver.
If I save directly to the DB, it will not trigger a subscription.
If I save via calling the type’s mutation (so calling a mutation within a mutation of the same schema), then it will trigger a subscription in my application, which is the desired effect.
Is this bad practice? Is there a better, recommended way of doing this?