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

Hasura.GraphQL.Logging.ExecutionLog

Description

This module holds functions and data types used for logging at the GraphQL layer. Unlike QueryLog, these are fired after queries are finished so could include things like execution time in future.

Synopsis

Documentation

data ExecutionLog Source #

A GraphQL query, optionally generated SQL, and the request id makes up the | ExecutionLog

newtype ExecutionStats b Source #

ExecutionStatistics is a type family, which means we can't partially apply it (in AnyBackend, for example). To get round this, we have a newtype that really just wraps the type family.

statsToAnyBackend :: forall b. HasTag b => ActionResult b -> (Maybe (AnyBackend ExecutionStats), EncJSON) Source #

When we want to log anything from DBStepInfo, we first need to transform the backend-specific execution statistics into AnyBackend statistics. This is fine in practice because all we do with it is log it as JSON.