graphql
graphql copied to clipboard
Logging of the objects (or object IDs) created, updated or deleted during a mutation.
Is your feature request related to a problem? Please describe. We want to log which nodes or edges were created, updated, or deleted during a mutation. The complete nodes do not have to be logged, the ID would be sufficient, for example.
Describe the solution you'd like As far as I know, the Cypher Query only queries the properties that are queried by the GraphQL Query. For example, if an "id" field is not requested, it cannot be logged, because this field wasn't read from the database. Maybe it would be an idea to introduce a new directive for such logging requirements, which forces a property to always be queried via the cypher query. But I am not sure.
Describe alternatives you've considered Currently we have not yet found a solution to the problem.
We need to discuss this as it may not be convenient from a GraphQL perspective, as only the requested data should be queried. Until we discuss this, maybe Subscriptions could help in your case (maybe using a custom plugin)
There is a workaround for this above, and we have no desire to adding audit logging natively into the library - there are database provisions for this.