Oh, man… ya.. my bad. I copied from Insomnia, thinking I left the query in working condition, but that was not true. It was borked, and likely due to my request I made here, in these forums, about what a mess refunds are.
From my App.. actual working code… sorry about that previous effort. You can maybe riff off this.
# get orders and use cursors. First call has a null cursor, result of the calls provide one
# note the query format: "created_at:>'2020-06-01',created_at:<'2020-07-01'"
GetOrdersWithCursor = QueryWrap.new(<<~GRAPHQL)
query($cursor: String, $foo: String) {
orders(first: 50, after: $cursor, query: $foo) {
pageInfo {
hasNextPage
}
edges {
cursor
node {
id
legacyResourceId
refunds {
refundLineItems(first: 5) {
edges {
node {
restockType
lineItem {
sku
quantity
}
}
}
}
}
}
}
}
}
GRAPHQL