Manage customer data

The following are example GraphQL queries and mutations for working with customers.

Querying customers

For more information on querying customers, see the customer object reference.

Get a customer's name, email, and default address

Query: POST /api/2021-07/graphql.json

View response

Get two specific customers by their ID using aliases

Query: POST /api/2021-07/graphql.json

View response

Get the email, name, and account creation date of three customers using a fragment

Query: POST /api/2021-07/graphql.json

View response

Get all a customer's fields and connections

Query: POST /api/2021-07/graphql.json

View response

Query: POST /api/2021-07/graphql.json

Creating customers

For more information, see the customerCreate mutation reference.

Create a customer and return their customer ID

Query: POST /api/2021-07/graphql.json

View response

Update a customer's tags

Query: POST /api/2021-07/graphql.json

View response

Deleting customers

For more information, see the customerDelete mutation reference.

Delete a customer and return their ID

Query: POST /api/2021-07/graphql.json

View response