How to create an accessToken and query customer information in ONE graphql call?

How to create an accessToken and query customer information in ONE graphql call?

Lederer
Shopify Partner
9 1 1

Hi,

is it possible to create a customerAccessToken and also query customer information in one GraphQL call?

Something like this, but with "autofilled" ACCESS_TOKEN_HERE ?

mutation {
  customerAccessTokenCreate(input: {
    email: "customer@example.com"
    password: "password123"
  }) {
    customerAccessToken {
      accessToken
    }
    customerUserErrors {
      field
      message
    }
  }
}

query {
  customer(customerAccessToken: "ACCESS_TOKEN_HERE") {
    firstName
  }
}

  

Replies 0 (0)