Generally a query is when you fetch data and mutation is when you manipulate data. But how would I implement a mutation without any arguments?
In my particular case I have delete and create 2fa token endpoints. Both the delete and create token have no arguments as they rely on the logged in user id. They both either destroy or create a record in the database. So I would prefer that they be mutations. But that is not possible?
I'm using Graphql-Ruby. But this is more of a general Graphql question.
EDIT:
So turns out I was wrong. I couldn't find any info about it so I just assumed it wasn't possible. I hope this helps someone else. In Graphql-Ruby you can do:
mutation {
createFoo(input: {})
}