graphql-engine/server/src-lib/Hasura/Backends/DataWrapper/IR/Scalar/Value.hs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
736 B
Haskell
Raw Normal View History

{-# LANGUAGE DeriveAnyClass #-}
module Hasura.Backends.DataWrapper.IR.Scalar.Value
( Value (..),
)
where
--------------------------------------------------------------------------------
import Data.Aeson (FromJSON, ToJSON)
import Hasura.Incremental (Cacheable)
import Hasura.Prelude
--------------------------------------------------------------------------------
-- | Literal scalar values that can appear as leaf nodes in expressions
--
-- NOTE: This type shouldn't _need_ ser/de instances, but they're imposed by
-- the 'Backend' class.
data Value
= String Text
| Number Double
| Boolean Bool
| Null
deriving stock (Data, Eq, Generic, Ord, Show)
deriving anyclass (Cacheable, FromJSON, Hashable, NFData, ToJSON)