Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Expecting one more argument to ‘Boolean’" using Boolean in client code #583

Closed
th3coop opened this issue Mar 13, 2021 · 4 comments
Closed

Comments

@th3coop
Copy link

th3coop commented Mar 13, 2021

I get the same error as #277 but that's closed fixed so reporting again.

Morpheus version: 0.17.0

Error:

• Expecting one more argument to ‘Boolean’
  Expected a type, but ‘Boolean’ has kind ‘Bool -> ScalarValue’
• In the first argument of ‘Maybe’, namely ‘Boolean’
  In the type ‘(Maybe Boolean)’
  In the definition of data constructor ‘StarWarsFilmsArgs’

Schema, a modified Starwars.graphql (altered name to be able to attach here):
starwars.txt

I changes line 3322 to skip: Boolean

Client code StarWars.hs:
StarWars.txt

To even get it to that point I had to add the following lines to the file:
{-# LANGUAGE DataKinds #-} at line 8
and
import Data.Morpheus.Types (ScalarValue (..)) at line 23

Thanks in advance for any help!

@nalchevanidze
Copy link
Member

Hi @th3coop . thanks. i will check it out.

@nalchevanidze
Copy link
Member

nalchevanidze commented Mar 31, 2021

Hi @th3coop. this problem was already fixed in eralier versions. i don't know why this error ocoured again, but i will fix it.

until that you can use just workaround.

type Boolean = Bool

which will teach the Morpheus Client that type Booelan is in Haskell Bool.

@th3coop
Copy link
Author

th3coop commented Apr 2, 2021

@nalchevanidze thanks for the follow up. Will give that a try.

@nalchevanidze
Copy link
Member

is fixed in #589. I also added a test to avoid this in the next versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants