Suddenly GraphQL response is empty

Shopify Partner
7 0 0

I am developing an app for my client.
The app uses GraphiQL to get order data.
I was able to get it without problems until the day before yesterday, but suddenly the response was empty today.

 

The graphiQL query is as follows:

 

{
  orders(first: 5, query: "fulfillment_status:'shipped' OR fulfillment_status:'partial' AND financial_status:'paid' OR financial_status:'partially_refunded' OR financial_status:'refunded' OR financial_status:'partially_paid' AND tag:'test'") {
    edges {
      cursor
      node {
        id
        legacyResourceId
        processedAt
        name
        paymentGatewayNames
        displayFulfillmentStatus
        tags
        totalDiscounts
        transactions(first: 5) {
          amount
          gateway
        }
        customAttributes {
          key
          value
        }
        totalPrice
        subtotalPrice
        totalShippingPrice
        totalRefunded
        totalRefundedShippingSet {
          presentmentMoney {
            amount
          }
        }
        metafields(first: 2) {
          edges {
            cursor
            node {
              key
              namespace
              value
            }
          }
          pageInfo {
            hasNextPage
          }
        }
        lineItems(first: 3) {
          edges {
            cursor
            node {
              id
              quantity
              sku
              title
              originalUnitPrice
              fulfillmentStatus
              customAttributes {
                key
                value
              }
              product {
                tags
                legacyResourceId
              }
            }
          }
          pageInfo {
            hasNextPage
          }
        }
        fulfillments(first: 10) {
          id
          legacyResourceId
          createdAt
          fulfillmentLineItems(first: 3) {
            edges {
              cursor
              node {
                lineItem {
                  id
                  quantity
                  sku
                  title
                  fulfillmentStatus
                  originalUnitPrice
                  discountedUnitPriceSet {
                    shopMoney {
                      amount
                    }
                  }
                  customAttributes {
                    key
                    value
                  }
                  product {
                    tags
                    legacyResourceId
                  }
                }
              }
            }
            pageInfo {
              hasNextPage
            }
          }
        }
        refunds(first: 10) {
          id
          legacyResourceId
          createdAt
          updatedAt
          refundLineItems(first: 3) {
            edges {
              cursor
              node {
                price
                quantity
                subtotal
                lineItem {
                  id
                  quantity
                  sku
                  title
                  originalUnitPrice
                  fulfillmentStatus
                  discountedUnitPrice
                  customAttributes {
                    key
                    value
                  }
                  product {
                    tags
                    legacyResourceId
                  }
                }
              }
            }
            pageInfo {
              hasNextPage
            }
          }
        }
      }
    }
    pageInfo {
      hasNextPage
    }
  }
}

When sending a request with GraphiQL, the API returns the status code 200, but the response is empty.
Like this:

 {"data"=>{"orders"=>{"edges"=>[], "pageInfo"=>{"hasNextPage"=>false}}}, "extensions"=>{"cost"=>{"requestedQueryCost"=>106, "actualQueryCost"=>2, "throttleStatus"=>{"maximumAvailable"=>4000.0, "currentlyAvailable"=>3998, "restoreRate"=>200.0}}}}

Why did the response suddenly become empty?

 

0 Likes
Highlighted
Excursionist
21 0 4
Hi, I do have a question regarding Graphql, i made it work but when we changed our domain from ".myshopify" to "custom" domain, it stopped working, it returns a error 400. Here's the complete error. OPTIONS https://testwebsite.myshopify.com/admin/api/graphql.json 400 Access to XMLHttpRequest at 'https://testwebsite.myshopify.com/admin/api/graphql.json' from origin 'https://testwebsite.com.au' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Hope you can give me an answer. Thank you
0 Likes