1
Fork 0
mirror of https://github.com/Airsequel/AirGQL.git synced 2025-07-26 18:08:43 +03:00

Remove some unused stuff & some debugging lines

This commit is contained in:
prescientmoon 2024-11-15 17:04:17 +01:00
parent 9088c8fd05
commit 6bae78311d
2 changed files with 2 additions and 49 deletions
source/AirGQL
tests/Tests

View file

@ -1,47 +0,0 @@
{-|
Increase readability of code
by wrapping `graphql` library with descriptive wrappers
-}
module AirGQL.GQLWrapper (
OutField (..),
outFieldToField,
InArgument (..),
inArgumentToArgument,
)
where
import Protolude (Maybe, Text)
import Language.GraphQL.Type (Value)
import Language.GraphQL.Type.In qualified as In
import Language.GraphQL.Type.Out qualified as Out
data OutField m = OutField
{ descriptionMb :: Maybe Text
, fieldType :: Out.Type m
, arguments :: In.Arguments
}
outFieldToField :: OutField m -> Out.Field m
outFieldToField outField =
Out.Field
outField.descriptionMb
outField.fieldType
outField.arguments
data InArgument = InArgument
{ argDescMb :: Maybe Text
, argType :: In.Type
, valueMb :: Maybe Value
}
inArgumentToArgument :: InArgument -> In.Argument
inArgumentToArgument inArgument =
In.Argument
inArgument.argDescMb
inArgument.argType
inArgument.valueMb

View file

@ -101,8 +101,8 @@ rmSpaces text =
Nothing -> "ERROR: Failed to decode JSON"
{-| Checks whether a value would get encoded to a json string. Does not care
about the order of fields or elements in lists.
{-| Checks whether a value would get encoded to a given json string.
Does not care about the order of fields or elements in lists.
-}
unorderedShouldBe :: (ToJSON a) => a -> Text -> IO ()
unorderedShouldBe actual expected = do