Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Why does the Bulk Operations GraphQL return only 100 discount redeem codes

Why does the Bulk Operations GraphQL return only 100 discount redeem codes

AnojPushowl
Shopify Partner
1 0 0

When I perform a query for bulk operations related to discount codes, I consistently receive only 100 discount redeem codes in the results. However, I have two discount codes one having 500 discount redeem codes and other one 10K redeem codes

Has anyone else encountered this limitation before? Is there a specific reason why only 100 redeem discount codes are being returned, or is there a way to retrieve all redeem discount codes in a single query?

GraphQL Query

 

 

 

mutation {
  bulkOperationRunQuery(
    query: """
    {
      discountNodes {
        edges {
            node {
                id
                discount {
                    ... on DiscountCodeBasic {
                        title
                        codeCount
                        status
                        codes {
                            edges {
                                node {
                                    id
                                    code
                                }
                            }
                        }
                    }
                }
            }
        }
      }
    }
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

 

 

 

 

Replies 0 (0)