Shopify Community AMA with Shopify Developers: The New GraphQL Product APIs

This store for example: maxigastro-sverige

Here is the payload:

mutation {
  bulkOperationRunQuery(
    query: """ {
      productVariants(first: 999999) {
	edges {
	  node {
	    id
	    sku
	    displayName
	    price
	    compareAtPrice
	    contextualPricing(context: {country: SE}) {
	      price {
		amount
		currencyCode
	      }
	      compareAtPrice {
		amount
		currencyCode
	      }
	    }
	    image {
	     url
	    }
	    availableForSale
	    inventoryQuantity
	    translations(locale: "sv") {
	      key
	      value
	    }
	    product {
	      id
	      title
	      descriptionHtml
	      onlineStoreUrl
	      onlineStorePreviewUrl
	      vendor
	      featuredImage {
		url
	      }
	      productCategory {
		productTaxonomyNode {
		  fullName
		}
	      }
	      productType
	      totalVariants
	      status
	      translations(locale: "sv") {
		key
		value
	      }
	      images(first: 1, sortKey: POSITION) {
		edges {
		  node {
		    url
		  }
		}
	      }
	    }
	  }
	}
      }
    }
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

And then I poll the id in the response:

{
		  node(id: "$id") {
		    ... on BulkOperation {
		      status
		      url
		    }
		  }
		}

For some stores it takes maybe 2-3 seconds. For most stores it takes maybe 20-25 seconds. And for a few it surpassed 2 minutes or more.

If there is a better way to get thousands of products in seconds from a single store in a synchronous call, without getting over quota, then I’d love that. Also remember that I will connect to maybe a hundred stores, so every second counts.