graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.QueryTags

Description

This module has the various metadata we want to attach to the generated/executed query

Synopsis

Documentation

data QueryTags Source #

Query Tags are SQL comments which are made up of (key=value) pairs.

These 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.

The application context(query tags) can be used to detect slow GQL operation and relate them back to the SQL that was generated.

For eg: SELECT name FROM child * request_id=487c2ed5-08a4-429a-b0e0-4666a82e3cc6, field_name=child, operation_name=GetChild *

For more usage information, refer Query Tags Docs

Instances

Instances details
Show QueryTags Source # 
Instance details

Defined in Hasura.QueryTags

newtype QueryTagsComment Source #

query-tags as SQL comment which is appended to the prepared SQL statement

Constructors

QueryTagsComment 

class Monad m => MonadQueryTags m where Source #

Minimal complete definition

Nothing

Methods

createQueryTags :: QueryTagsAttributes -> Maybe QueryTagsConfig -> Tagged m QueryTagsComment Source #

Creates Query Tags. These are appended to the Generated SQL. Helps users to use native database monitoring tools to get some 'application-context'.