Query
query Coupons {
coupons {
edges {
cursor
node {
additionalMetaData
amountsOff {
__typename
}
billingId
billingLinkUrl
createdAt
customers {
__typename
}
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}Response
{
"data": {
"coupons": {
"edges": [
{
"cursor": "value",
"node": {
"additionalMetaData": "value",
"amountsOff": [
{
"__typename": "Money"
}
],
"billingId": "string",
"billingLinkUrl": "string",
"createdAt": "value",
"customers": [
{
"__typename": "Customer"
}
]
}
}
],
"pageInfo": {
"endCursor": "value",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "value"
},
"totalCount": 1
}
}
}Queries
coupons
QUERY
coupons(filter: CouponFilter, paging: CursorPaging, sorting: [CouponSort!]): CouponConnection!Arguments
filter
default:{}
Specify to filter the records returned.
paging
default:{first: 10}
Limit or page results.
sorting
[CouponSort!]
default:[{direction: DESC, field: createdAt}]
Specify to sort results.
Returns
edges
[CouponEdge!]!
Array of edges.
pageInfo
Paging information
totalCount
Int!
Fetch total count of records
Query
query Coupons {
coupons {
edges {
cursor
node {
additionalMetaData
amountsOff {
__typename
}
billingId
billingLinkUrl
createdAt
customers {
__typename
}
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}Response
{
"data": {
"coupons": {
"edges": [
{
"cursor": "value",
"node": {
"additionalMetaData": "value",
"amountsOff": [
{
"__typename": "Money"
}
],
"billingId": "string",
"billingLinkUrl": "string",
"createdAt": "value",
"customers": [
{
"__typename": "Customer"
}
]
}
}
],
"pageInfo": {
"endCursor": "value",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "value"
},
"totalCount": 1
}
}
}