Is there a way to know whether a fired query Mutation or Query from GraphQLRequestContext?
I use ApolloServer
on the API side. For a particular need, I want to log mutations separately from queries. For logging, I use Apollo plugin, which subscribes to events, proving a GraphQLRequestContext
object. While I could manually check whether the .query
contains the word query
or mutation
, I was wondering if there is this info already somewhere within the context