diff options
Diffstat (limited to 'src/Language/GraphQL/Type')
| -rw-r--r-- | src/Language/GraphQL/Type/Definition.hs | 13 | ||||
| -rw-r--r-- | src/Language/GraphQL/Type/Directive.hs | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Language/GraphQL/Type/Definition.hs b/src/Language/GraphQL/Type/Definition.hs index 1379018..40055e7 100644 --- a/src/Language/GraphQL/Type/Definition.hs +++ b/src/Language/GraphQL/Type/Definition.hs @@ -2,7 +2,8 @@ -- | Types that can be used as both input and output types. module Language.GraphQL.Type.Definition - ( EnumType(..) + ( Arguments(..) + , EnumType(..) , EnumValue(..) , ScalarType(..) , Subs @@ -40,6 +41,16 @@ instance IsString Value where -- and the value is the variable value. type Subs = HashMap Name Value +-- | 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 + -- | Scalar type definition. -- -- The leaf values of any request and input values to arguments are Scalars (or diff --git a/src/Language/GraphQL/Type/Directive.hs b/src/Language/GraphQL/Type/Directive.hs index 017132c..6ff73d4 100644 --- a/src/Language/GraphQL/Type/Directive.hs +++ b/src/Language/GraphQL/Type/Directive.hs @@ -7,7 +7,6 @@ module Language.GraphQL.Type.Directive import qualified Data.HashMap.Strict as HashMap import Language.GraphQL.AST (Name) -import Language.GraphQL.AST.Core import Language.GraphQL.Type.Definition -- | Directive. |
