I tried to get Shopify's purchase history
Admin私のストアShare
Added GraphQL and Flow apps to the store
Shopify's GraphQL is divided into Storeront and Admin. Software protection is implemented as a custom frontend with Shopify as the backend.
mutation {
customerAccessTokenCreate(input: {email: "****", password: "*****"}) {
customerAccessToken {
accessToken
}
}
}
query {
customer(customerAccessToken: "***") {
orders(first: 250) {
nodes {
Financial Status
customAttributes {
key
value
}
lineItems(first: 10) {
nodes {
variant {
product {
id
title
}
}
}
}
}
}
}
I create an access token from an email address and password, but I don't know how to create an access token in the case of one-time token authentication.
Payment status of products from orders (
The Storefront API did not allow us to link the payment date and time from a GraphQL resolver, so we used the Flow applet.
Create a trigger when the payment status of an order changes to PAID, and set the date and time when the trigger occurs to the customAttributes field of Order.