Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module has the various metadata we want to attach to the generated/executed query
Synopsis
- data QueryTags
- newtype QueryTagsComment = QueryTagsComment {
- _unQueryTagsComment :: Text
- type Attribute = (Text, Text)
- newtype QueryTagsAttributes = QueryTagsAttributes {}
- emptyQueryTagsAttributes :: QueryTagsAttributes
- emptyQueryTagsComment :: QueryTagsComment
- data QueryMetadata = QueryMetadata {}
- data MutationMetadata = MutationMetadata {}
- data LivequeryMetadata = LivequeryMetadata {}
- encodeQueryTags :: QueryTags -> QueryTagsAttributes
- operationNameAttributes :: Maybe Name -> [(Text, Text)]
Documentation
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
newtype QueryTagsComment Source #
query-tags as SQL comment which is appended to the prepared SQL statement
QueryTagsComment | |
|
Instances
Eq QueryTagsComment Source # | |
Defined in Hasura.QueryTags (==) :: QueryTagsComment -> QueryTagsComment -> Bool # (/=) :: QueryTagsComment -> QueryTagsComment -> Bool # | |
Show QueryTagsComment Source # | |
Defined in Hasura.QueryTags showsPrec :: Int -> QueryTagsComment -> ShowS # show :: QueryTagsComment -> String # showList :: [QueryTagsComment] -> ShowS # |
newtype QueryTagsAttributes Source #
Instances
Eq QueryTagsAttributes Source # | |
Defined in Hasura.QueryTags (==) :: QueryTagsAttributes -> QueryTagsAttributes -> Bool # (/=) :: QueryTagsAttributes -> QueryTagsAttributes -> Bool # | |
Show QueryTagsAttributes Source # | |
Defined in Hasura.QueryTags showsPrec :: Int -> QueryTagsAttributes -> ShowS # show :: QueryTagsAttributes -> String # showList :: [QueryTagsAttributes] -> ShowS # |
data QueryMetadata Source #
QueryMetadata | |
|
Instances
Show QueryMetadata Source # | |
Defined in Hasura.QueryTags showsPrec :: Int -> QueryMetadata -> ShowS # show :: QueryMetadata -> String # showList :: [QueryMetadata] -> ShowS # |
data MutationMetadata Source #
MutationMetadata | |
|
Instances
Show MutationMetadata Source # | |
Defined in Hasura.QueryTags showsPrec :: Int -> MutationMetadata -> ShowS # show :: MutationMetadata -> String # showList :: [MutationMetadata] -> ShowS # |
data LivequeryMetadata Source #
Instances
Show LivequeryMetadata Source # | |
Defined in Hasura.QueryTags showsPrec :: Int -> LivequeryMetadata -> ShowS # show :: LivequeryMetadata -> String # showList :: [LivequeryMetadata] -> ShowS # |
operationNameAttributes :: Maybe Name -> [(Text, Text)] Source #