Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
roryc89 committed Jan 26, 2021
1 parent dac73b0 commit d23e2fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/GraphQL/Client/Args.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Data.DateTime (DateTime)
import Data.Maybe (Maybe)
import Data.Symbol (class IsSymbol, SProxy)
import Data.Time (Time)
import Data.Typelevel.Bool (False, True)
import Heterogeneous.Folding (class FoldingWithIndex, class HFoldlWithIndex)
import Heterogeneous.Mapping (class HMapWithIndex, class MappingWithIndex)
import Prim.Row as Row
Expand All @@ -32,12 +33,18 @@ infixr 6 AndArg as ++

class ArgGql params arg

instance argToGqlNotNull :: ArgGql param arg => ArgGql (NotNull param) arg
instance argToGqlMaybe :: ArgGql param arg => ArgGql (Maybe param) arg
instance argToGqlArray :: ArgGql param arg => ArgGql (Array param) (Array arg)
instance argToGqlNotNull :: (MaybeNotAllowedForNotNullArgs False arg, ArgGql param arg) => ArgGql (NotNull param) arg
else instance argToGqlMaybe :: ArgGql param arg => ArgGql param (Maybe arg)
else instance argToGqlArray :: ArgGql param arg => ArgGql (Array param) (Array arg)
else instance argToGqlArrayAnd :: (ArgGql param a1, ArgGql (Array param) a2) => ArgGql (Array param) (AndArg a1 a2)
else instance argToGqlArrayOne :: ArgGql param arg => ArgGql (Array param) arg

class MaybeNotAllowedForNotNullArgs b t | b -> t

instance isMaybe :: MaybeNotAllowedForNotNullArgs True (Maybe a)

instance isNotMaybe :: MaybeNotAllowedForNotNullArgs False a

instance argToGqlInt :: ArgGql Int Int
instance argToGqlNumber :: ArgGql Number Number
instance argToGqlString :: ArgGql String String
Expand Down
2 changes: 1 addition & 1 deletion test/GraphQL/Client/CodeGen/SchemaFromGqlToPurs.Test.purs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ enum my_enum {
, symbols: [ "prop" ]
, enums:
[ { name: "MyEnum"
, values: [ "EnumVal1", "EnumVal2" ]
, values: [ "enum_val1", "enum_val2" ]
}
]
}
Expand Down

0 comments on commit d23e2fa

Please sign in to comment.