diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b25c9787..e2b76021 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,3 +39,5 @@ jobs: - run: npm i - run: npm run bundle - run: node ./run-example-tests.js + - run: node ./run-should-fail-tests.js + diff --git a/run-example-tests.js b/run-example-tests.js index 7629ec0f..f96775a4 100644 --- a/run-example-tests.js +++ b/run-example-tests.js @@ -1,6 +1,6 @@ const { readdirSync } = require('fs') -const {promisify} = require('util') -const exec = promisify(require("exec-sh")) +const { promisify } = require('util') +const exec = promisify(require('exec-sh')) const getDirectories = source => readdirSync(source, { withFileTypes: true }) @@ -8,13 +8,12 @@ const getDirectories = source => .map(dirent => dirent.name) const go = async () => { + const packages = getDirectories('./examples') - const packages = getDirectories('./examples'); - - for(let package of packages){ - console.log(`Testing ${package}`); - await exec(`cd "./examples/${package}" && npm t`) - } + for (const p of packages) { + console.log(`Testing ${p}`) + await exec(`cd "./examples/${p}" && npm t`) + } } -go() \ No newline at end of file +go() diff --git a/src/GraphQL/Client/Args.purs b/src/GraphQL/Client/Args.purs index 46a95941..1dd701e2 100644 --- a/src/GraphQL/Client/Args.purs +++ b/src/GraphQL/Client/Args.purs @@ -7,7 +7,6 @@ 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 @@ -33,17 +32,12 @@ infixr 6 AndArg as ++ class ArgGql params arg -instance argToGqlNotNull :: (MaybeNotAllowedForNotNullArgs False arg, ArgGql param arg) => ArgGql (NotNull param) arg -else instance argToGqlMaybe :: ArgGql param arg => ArgGql param (Maybe arg) +instance argToGqlNotNull :: 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