nicolaslopezj / meteor-apollo-accounts

Meteor accounts in GraphQL
MIT License
145 stars 37 forks source link

loginWithPassword and other mutations return null #22

Closed janikvonrotz closed 7 years ago

janikvonrotz commented 7 years ago

My setup: https://github.com/janikvonrotz/meteor-apollo-accounts-example/tree/bug/nullreturn

Now when I try:

mutation{
  loginWithPassword(email: "admin@example.com", plainPassword: "password")  {
    id
    token
    tokenExpires
  }
}

it returns

{
  "data": {
    "loginWithPassword": null
  }
}

The user exist and no other errors are thrown.

Of course I tried to debug it, but was not successful.

dbrrt commented 7 years ago

Is "passsword" a typo ? I'll try to reproduce this case.

Do you think that we'll be able soon to do something like, directly from GraphiQL ? :

  loginWithPassword(email: "admin@example.com", plainPassword: "passsword") {
    id
    token
    tokenExpires
    profile
  }
nicolaslopezj commented 7 years ago

Hmm very strange @janikvonrotz... It's ok in my app. It's the password with 3 s?

janikvonrotz commented 7 years ago

Password with 3 s was a typo, but didn't solve the error.

janikvonrotz commented 7 years ago

Forgot to turn the resolvers spread into a function. This ...Resolvers into ...Resolvers().