๐๏ธ The WooCommerce integration has arrived to Gato GraphQL!
The WooCommerce extension is now available for Gato GraphQL! ๐

This brand-new extension allows us to fetch data from WooCommerce, including products, orders, customers, coupons, etc.
Here are examples of queries to fetch data from your WooCommerce store.
Products (All)
This query fetches all products with their basic information:
query FetchAllProducts {
woocommerceProducts {
__typename
id
name
slug
url
urlPath
sku
...on WooCommercePriceableProductOrProductVariation {
price
priceFormatted
regularPrice
regularPriceFormatted
salePrice
salePriceFormatted
onSale
}
status
type
featured
totalSales
averageRating
ratingCount
image {
id
src
altText
title
caption
}
categories {
id
name
slug
}
tags {
id
name
slug
}
brands {
id
name
slug
}
}
woocommerceProductsCount
}Products (by Type)
Simple Products
This query fetches all simple products:
query FetchSimpleProducts {
woocommerceSimpleProducts {
__typename
id
name
slug
url
urlPath
sku
description
shortDescription
price
priceFormatted
regularPrice
regularPriceFormatted
salePrice
salePriceFormatted
onSale
status
type
featured
totalSales
averageRating
ratingCount
image {
id
src
altText
title
caption
}
categories {
id
name
slug
}
tags {
id
name
slug
}
brands {
id
name
slug
}
# Stock management fields
manageStock
stockQuantity
stockStatus
backorders
backordersAllowed
backordered
soldIndividually
lowStockThreshold
# Shipping fields
isVirtual
weight
length
width
height
dimensions
shippingClassID
shippingClass {
id
name
slug
description
count
}
# Downloadable fields
isDownloadable
downloadLimit
downloadExpiry
downloads
downloadsCount
# Tax fields
taxStatus
taxClass
# Cross-sell fields
crossSellIDs
crossSells {
id
name
slug
sku
}
}
woocommerceSimpleProductsCount
}External Products
This query fetches all external products:
query FetchExternalProducts {
woocommerceExternalProducts {
__typename
id
name
slug
url
urlPath
sku
description
shortDescription
price
priceFormatted
regularPrice
regularPriceFormatted
salePrice
salePriceFormatted
onSale
status
type
featured
totalSales
averageRating
ratingCount
image {
id
src
altText
title
caption
}
categories {
id
name
slug
}
tags {
id
name
slug
}
brands {
id
name
slug
}
# External product specific fields
externalURL
buttonText
# Tax fields
taxStatus
taxClass
}
woocommerceExternalProductsCount
}Group Products
This query fetches all group products:
query FetchGroupProducts {
woocommerceGroupProducts {
__typename
id
name
slug
url
urlPath
sku
description
shortDescription
status
type
featured
totalSales
averageRating
ratingCount
image {
id
src
altText
title
caption
}
categories {
id
name
slug
}
tags {
id
name
slug
}
brands {
id
name
slug
}
# Group product specific fields
hasChildren
childrenCount
minPrice
maxPrice
minPriceFormatted
maxPriceFormatted
children {
id
name
slug
sku
}
}
woocommerceGroupProductsCount
}Variable Products
This query fetches all variable products:
query FetchVariableProducts {
woocommerceVariableProducts {
__typename
id
name
slug
url
urlPath
sku
description
shortDescription
status
type
featured
totalSales
averageRating
ratingCount
image {
id
src
altText
title
caption
}
categories {
id
name
slug
}
tags {
id
name
slug
}
brands {
id
name
slug
}
# Variable product specific fields
hasVariations
variationsCount
minPrice
maxPrice
minRegularPrice
maxRegularPrice
minSalePrice
maxSalePrice
priceRange
variations {
id
name
slug
sku
}
defaultAttributes {
taxonomy
termSlug
termObject {
id
name
slug
}
}
# Cross-sell fields
crossSellIDs
crossSells {
id
name
slug
sku
}
# Tax fields
taxStatus
taxClass
}
woocommerceVariableProductsCount
}Customers
This query fetches all customers:
query FetchCustomers {
woocommerceCustomers {
__typename
id
username
email
firstName
lastName
displayName
description
createdDate
createdDateStr
formattedCreatedDateStr: createdDateStr(format: "d/m/Y H:i:s")
modifiedDate
modifiedDateStr
formattedModifiedDateStr: modifiedDateStr(format: "d/m/Y H:i:s")
role
billing
shipping
isPayingCustomer
avatarURL
totalSpent
totalSpentFormatted
orderCount
lastOrderID
lastOrder {
id
orderNumber
status
total
date
}
orders {
id
orderNumber
status
total
date
}
ordersCount
}
woocommerceCustomersCount
}Orders
This query fetches all orders:
query FetchOrders {
woocommerceOrders {
__typename
id
orderNumber
orderKey
date
modifiedDate
dateStr
formattedDateStr: dateStr(format: "d/m/Y H:i:s")
modifiedDateStr
formattedModifiedStr: modifiedDateStr(format: "d/m/Y H:i:s")
status
isPaid
currency
total
totalFormatted
subtotal
subtotalFormatted
totalTax
totalTaxFormatted
totalShipping
totalShippingFormatted
totalDiscount
totalDiscountFormatted
totalDiscountTax
totalDiscountTaxFormatted
shippingTotal
shippingTotalFormatted
shippingTax
shippingTaxFormatted
cartTax
cartTaxFormatted
totalFee
totalFeeFormatted
customerID
customer {
id
username
email
firstName
lastName
displayName
}
customerNote
billingAddress
shippingAddress
hasCompletedStatus: hasStatus(status: "completed")
hasPendingStatus: hasStatus(status: "pending")
hasProcessingStatus: hasStatus(status: "processing")
hasOnHoldStatus: hasStatus(status: "on-hold")
hasCancelledStatus: hasStatus(status: "cancelled")
hasRefundedStatus: hasStatus(status: "refunded")
hasFailedStatus: hasStatus(status: "failed")
hasAnyCompletedOrProcessingStatus: hasAnyStatus(statuses: ["completed", "processing"])
hasAnyPendingOrOnHoldStatus: hasAnyStatus(statuses: ["pending", "on-hold"])
paymentMethod
paymentMethodTitle
transactionID
datePaid
datePaidStr
formattedDatePaidStr: datePaidStr(format: "d/m/Y H:i:s")
dateCompleted
dateCompletedStr
formattedDateCompletedStr: dateCompletedStr(format: "d/m/Y H:i:s")
cartHash
newOrderEmailSent
orderCurrency
orderVersion
pricesIncludeTax
discountTotal
discountTax
refunded
remainingRefundAmount
itemCount
items {
id
name
quantity
subtotal
subtotalFormatted
total
totalFormatted
totalTax
totalTaxFormatted
productID
variationID
reducedStockNumber
product {
id
name
slug
sku
}
variation {
id
name
slug
sku
}
}
refunds {
id
amount
amountFormatted
reason
status
}
downloadPermissionsGranted
needsPayment
needsProcessing
isDownloadPermitted
hasDownloadableItem
}
woocommerceOrdersCount
}Refunds
This query fetches all refunds:
query FetchRefunds {
woocommerceRefunds {
__typename
id
orderID
order {
id
orderNumber
status
}
amount
amountFormatted
reason
refundedBy {
id
name
email
}
isPaymentRefundedViaAPI
refundType
date
modifiedDate
dateStr
formattedDateStr: dateStr(format: "d/m/Y H:i:s")
modifiedDateStr
formattedModifiedDateStr: modifiedDateStr(format: "d/m/Y H:i:s")
status
}
woocommerceRefundsCount
}Reviews
This query fetches all product reviews:
query FetchProductReviews {
woocommerceReviews {
__typename
id
content
author
authorEmail
rating
verified
approved
date
dateStr
productID
product {
id
name
}
}
woocommerceReviewsCount
}Coupons
This query fetches all coupons:
query FetchCoupons {
woocommerceCoupons {
__typename
id
code
amount
amountFormatted
dateExpires
dateExpiresStr
formattedDateExpiresStr: dateExpiresStr(format: "d/m/Y H:i:s")
discountType
description
date
modifiedDate
dateStr
formattedDateStr: dateStr(format: "d/m/Y H:i:s")
modifiedDateStr
formattedModifiedDateStr: modifiedDateStr(format: "d/m/Y H:i:s")
usageCount
individualUse
productIDs
products {
id
name
slug
}
productsCount
excludedProductIDs
excludedProducts {
id
name
slug
}
excludedProductsCount
usageLimit
usageLimitPerUser
limitUsageToXItems
freeShipping
productCategoryIDs
productCategories {
id
name
slug
}
productCategoriesCount
excludedProductCategoryIDs
excludedProductCategories {
id
name
slug
}
excludedProductCategoriesCount
productBrandIDs
productBrands {
id
name
slug
}
productBrandsCount
excludedProductBrandIDs
excludedProductBrands {
id
name
slug
}
excludedProductBrandsCount
excludeSaleItems
minimumAmount
minimumAmountFormatted
maximumAmount
maximumAmountFormatted
emailRestrictions
usedByCustomerIDs
usedByCustomers {
id
username
email
firstName
lastName
displayName
}
usedByCustomersCount
}
woocommerceCouponsCount
}And More
You can find more examples in the following resources: