summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/AST/Core.hs
blob: 0fe3e0322fe3dffa262cf5fcb6458a4eda37d686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- | This is the AST meant to be executed.
module Language.GraphQL.AST.Core
    ( Arguments(..)
    ) where

import Data.HashMap.Strict (HashMap)
import Language.GraphQL.AST (Name)
import Language.GraphQL.Type.Definition

-- | Argument list.
newtype Arguments = Arguments (HashMap Name Value)
    deriving (Eq, Show)

instance Semigroup Arguments where
    (Arguments x) <> (Arguments y) = Arguments $ x <> y

instance Monoid Arguments where
    mempty = Arguments mempty