| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hasura.QueryTags
Description
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
Constructors
| QTQuery !QueryMetadata | |
| QTMutation !MutationMetadata | |
| QTLiveQuery !LivequeryMetadata |
newtype QueryTagsComment Source #
query-tags as SQL comment which is appended to the prepared SQL statement
Constructors
| QueryTagsComment | |
Fields
| |
Instances
| Eq QueryTagsComment Source # | |
Defined in Hasura.QueryTags Methods (==) :: QueryTagsComment -> QueryTagsComment -> Bool # (/=) :: QueryTagsComment -> QueryTagsComment -> Bool # | |
| Show QueryTagsComment Source # | |
Defined in Hasura.QueryTags Methods showsPrec :: Int -> QueryTagsComment -> ShowS # show :: QueryTagsComment -> String # showList :: [QueryTagsComment] -> ShowS # | |
newtype QueryTagsAttributes Source #
Constructors
| QueryTagsAttributes | |
Fields | |
Instances
| Eq QueryTagsAttributes Source # | |
Defined in Hasura.QueryTags Methods (==) :: QueryTagsAttributes -> QueryTagsAttributes -> Bool # (/=) :: QueryTagsAttributes -> QueryTagsAttributes -> Bool # | |
| Show QueryTagsAttributes Source # | |
Defined in Hasura.QueryTags Methods showsPrec :: Int -> QueryTagsAttributes -> ShowS # show :: QueryTagsAttributes -> String # showList :: [QueryTagsAttributes] -> ShowS # | |
data QueryMetadata Source #
Constructors
| QueryMetadata | |
Fields
| |
Instances
| Show QueryMetadata Source # | |
Defined in Hasura.QueryTags Methods showsPrec :: Int -> QueryMetadata -> ShowS # show :: QueryMetadata -> String # showList :: [QueryMetadata] -> ShowS # | |
data MutationMetadata Source #
Constructors
| MutationMetadata | |
Fields
| |
Instances
| Show MutationMetadata Source # | |
Defined in Hasura.QueryTags Methods showsPrec :: Int -> MutationMetadata -> ShowS # show :: MutationMetadata -> String # showList :: [MutationMetadata] -> ShowS # | |
data LivequeryMetadata Source #
Constructors
| LivequeryMetadata | |
Instances
| Show LivequeryMetadata Source # | |
Defined in Hasura.QueryTags Methods showsPrec :: Int -> LivequeryMetadata -> ShowS # show :: LivequeryMetadata -> String # showList :: [LivequeryMetadata] -> ShowS # | |
operationNameAttributes :: Maybe Name -> [(Text, Text)] Source #