scaphold-io / scaphold-issues

Post issues that you find on Scaphold here. Post anything about the platform, docs, boilerplates, etc... Happy Scapholding!
3 stars 0 forks source link

V2: CreateUser mutation returns a null token in its payload #4

Closed MacKentoch closed 7 years ago

MacKentoch commented 7 years ago

I'm talking about V2.

CreateUser mutation does its job: creating a user.

But CreateUserPayload returns a null token.

It is a bit annoying since I have to call LoginUser mutation after a CreateUser mutation to get the user token.

This:

 mutation CreateUser ($user: CreateUserInput!) {
    createUser (input: $user) {
        changedUser {
            id
            username
        }
        token
    }
}
# variables:
{
  "user": {
    "username": "test2",
    "password": "test2"
  }
}  

gives:


{
  "data": {
    "createUser": {
      "changedUser": {
        "id": "VXNlcjo3",
        "username": "test2"
      },
      "token": null
    }
  }
}
vning93 commented 7 years ago

Hi, thanks for letting us know! I've made the fix, and will push the changes up altogether with a couple other things tomorrow evening.

Best, Vince

MacKentoch commented 7 years ago

hi @vning93,

Thank you once again 👍

vning93 commented 7 years ago

No problem!

Get Outlook for iOS

On Mon, Oct 24, 2016 at 9:13 AM -1000, "Erwan DATIN" notifications@github.com wrote:

hi @vning93,

Thank you once again 👍

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

MacKentoch commented 7 years ago

hi @vning93 ,

Maybe I missed something since I still have a null token with createUser mutation...

By the way: if I invest so much time in short term it is because I'm trying to create an open source starter project based on scaphold as backend: react redux zero pain graphql backend apollo-starter.

The idea behind this starter, is to have:

MacKentoch commented 7 years ago

fixed, thanks!

vning93 commented 7 years ago

Awesome, no problem. Apologies for not letting you know here, but we just pushed up a ton of fixes the other day.

Let me know if you find anything else 👍