Hi there, I'm trying to use facebook auth, and got...
# prisma-whats-new
v
Hi there, I'm trying to use facebook auth, and got an error
Copy code
{
  "error": "Function returned invalid status code: 0. Raw body: empty.last"
}
who knows what is it ?
c
where did the error originate? I mean does it say where the error occurred
v
it happened after getting token from fb
Do you have any idea ? @callmekatootie
c
I am afraid not. I assume the arrow points to where the error occurs, and it seems to be with facebook api and not with graphql
v
facebook api works fine, error in createGraphcoolUser, but I don't know why
c
You have not pasted `createGraphcoolUser`'s body - is that a custom function?
Also, this looks like its graphcool and not prisma... is it?
v
Copy code
async function createGraphcoolUser(api: GraphQLClient, facebookUser: FacebookUser): Promise<string> {
    console.log(' createGraphcoolUser ', api, facebookUser)
    const mutation = `
    mutation createUser($facebookUserId: String!, $email: String, $username: String) {
      createUser(
        facebookUserId: $facebookUserId
        email: $email
        username: $username
      ) {
        id
      }
    }
  `

    const variables = {
        facebookUserId: facebookUser.id,
        email: facebookUser.email,
        username: facebookUser.email
    }

    return api.request<{ createUser: User }>(mutation, variables)
        .then(r => r.createUser.id)
}
yes, I don't have prisma, actually I don't understand for what prisma use ?
error happens here http://prntscr.com/in0u73
c
sorry, can't help you there (I don't know graphcool)
n
@Vendicto, does the error occur if you remove the
console.log
statement from
createGraphcoolUser
?
v
yes, still here
n
Please create a bug report here: https://github.com/graphcool/graphcool-framework/