Mutations to create/edit/delete Groups, Agents, Entries
With corresponding events which all clients subscribe to.
Ideally there should only be one event of type, because one subscription can only subscribe to one event at a time. I can start multiple subscriptions but I'm lazy.
So basically, one agentUpdate
subscription for all agent-related things (create/update/delete). The client will figure out the rest, or you can include additional fields, such as created: true
and deleted: true
.
The main use for this is an Admin UI where admins can manage everything.
However some of those endpoints can be used by people with access, i.e. agents can use the createEntry mutation, and use update/deleteEntry only on their own entries.
This also means that some Agents have to be marked as admins, which can call any endpoint, even if editing stuff not belonging to them.