I am trying to use graphql.request to work but the...
# prisma-whats-new
l
I am trying to use graphql.request to work but the reponse data is undefined... was thinking this be the result from the service. Maybe obvious to others
Copy code
import { request } from 'graphql-request'
const mutation = `{ 
  mutation signinUser($email: String!, $password: String!) {
    signinUser(email: { email: $email, password: $password }) {
      token, 
      user {
        id
      }
    }
  }
}`
const variables = {
      email,
      password
 }
request('<https://api.graph.cool/simple/v1/xkjdvsdf>', mutation, variables)
          .then(data => {
            console.log(data)
})
n
@lancej what's the value of
email
and
password
? 🙂
also, is there a permission for
EVERYONE
to access the
id
of an user?
@lancej you can also add
catch
to print the error: https://github.com/graphcool/graphql-request#error-handling
l
email and password are just that the passed in email and password to the function. I have a catch but that is never called even when I give it wrong info
n
what about the permission setup?
l
permissions set to Everyone
n
can you PM me the code so I can inspect it?