A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello, I'm playing around with the Shopify Partners API as a little hobby project. I'm running into an issue with querying transactions though, I can't find any way to actually get any useful information about a transaction.
The documentation tells me there are many additional transaction objects with additional fields, but I can't seem to use them. Each time I try to add those additional fields to the query, I get an error saying the field doesn't exist on the Transaction type. The only fields I'm able to query are "id" and "createdAt" from the base Transaction interface.
Does anyone know what I'm doing wrong here? I'm pretty stumped, I have no idea how to get any useful information like the amount or even the app that created the transaction.
Some links:
Solved! Go to the solution
This is an accepted solution.
Hey @nozzlegear not exactly sure which what your query is but the structure should be something like this example:
query {
transactions {
edges {
node {
id
createdAt
... on AppSubscriptionSale {
shop {
name
}
netAmount{
amount
currencyCode
}
}
}
}
}
}
Basically, I am using AppSubscriptionSale object here, but can implement with any of the others following this structures that Transactions implements.
Hope this helps!
This is an accepted solution.
Hey @nozzlegear not exactly sure which what your query is but the structure should be something like this example:
query {
transactions {
edges {
node {
id
createdAt
... on AppSubscriptionSale {
shop {
name
}
netAmount{
amount
currencyCode
}
}
}
}
}
}
Basically, I am using AppSubscriptionSale object here, but can implement with any of the others following this structures that Transactions implements.
Hope this helps!
@abm1Thank you so much! That's exactly what I was looking for, it worked perfectly.