graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Tracing capabilities from frontend to database, thru Hasura

Open Aarbel opened this issue 1 year ago • 1 comments

Hi Hasura team,

is there a way to have query comments inside our potsgresql logs function of the graphql calls performed in the frontend (best would be to bring this comment from the frontent).

The goal is to have much more tracing of the origin of the queries before on our database.

Thanks a lot for your help !

Cf https://discord.com/channels/407792526867693568/1235882269168636015

Aarbel avatar May 03 '24 09:05 Aarbel

Maybe a solution could be using custom directives in the graphql query, that would be converted by Hasura to SQL comments in the sql query generated by Hasura.

Example

query myNewQuery() @comment(value: "FetchingUsers") {
  users() {
    id
    full_name
    email
  }
}

Aarbel avatar May 03 '24 09:05 Aarbel