Skip to content

[Step 3] Update Snippet mutations to track edit events by snippet's editor

We need to update the snippets' mutations to include the call to track the edit event performed by the snippets editor.

First, we need to get if the request was performed by the editor because it can also be made directly through GraphQL. For this, we can use the same approach we have in the commits API, and try to find the user from warden.

In case it's not possible we can change the FE code and include a new param that, if present, the mutation will call the metrics service.

Edited by Francisco Javier López