Introduction
Query Tags are SQL comments which are made up of (key=value)
pairs that are appended to the SQL statements generated by Hasura for GraphQL operations. This enables the ability to get some application context in the database logs and also use native database monitoring tools (e.g. pganalyze) for better performance analysis.
Example:
When the following query is sent to Hasura
query GetChild {
child {
name
}
}
Hasura attaches query tags (unless disabled) to the generated SQL statement it sends to the database.
SELECT name FROM child /* request_id=487c2ed5-08a4-429a-b0e0-4666a82e3cc6, field_name=child, operation_name=GetChild */