Plugin-Daten abfragen
Plugin-Daten abfragenWooCommerce

WooCommerce

Beispiele für queries zum Abrufen von Daten aus dem WooCommerce-Plugin.

Produkte (Alle)

Diese query ruft alle Produkte mit ihren grundlegenden Informationen ab:

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
}

Diese query ruft ein einzelnes Produkt anhand der ID ab:

query FetchProduct($productId: ID!) {
  woocommerceProduct(by: { id: $productId }) {
    __typename
    id
    name
    slug
    url
    urlPath
    sku
    description
    shortDescription
    ...on WooCommercePriceableProductOrProductVariation {
      price
      priceFormatted
      regularPrice
      regularPriceFormatted
      salePrice
      salePriceFormatted
      onSale
    }
    status
    type
    featured
    totalSales
    averageRating
    ratingCount
    image {
      id
      src
      altText
      title
      caption
    }
    galleryImages {
      id
      src
      altText
      title
      caption
    }
    categories {
      id
      name
      slug
    }
    tags {
      id
      name
      slug
    }
    brands {
      id
      name
      slug
    }
    attributes {
      name
      options
      position
      isVisible
      isVariation
    }
  }
}

Diese query ruft ein Produkt anhand des Slugs ab:

query FetchProductBySlug($slug: String!) {
  productBySlug: woocommerceProduct(by: { slug: $slug }) {
    __typename
    id
    name
    slug
    url
    sku
  }
}

Diese query ruft ein Produkt anhand der SKU ab:

query FetchProductBySku($sku: String!) {
  productBySku: woocommerceProduct(by: { sku: $sku }) {
    __typename
    id
    name
    slug
    url
    sku
  }
}

Produktkategorien, -tags und -marken

Diese query ruft alle Produktkategorien ab:

query FetchProductCategories {
  woocommerceProductCategories {
    __typename
    id
    url
    urlPath
    slug
    name
    description
    count
    slugPath
    parentID
    parent {
      id
      name
      slug
    }
    thumbnail {
      id
      src
      altText
      title
      caption
    }
    displayType
    menuOrder
    ancestors {
      id
      name
      slug
    }
    children {
      id
      name
      slug
      parent {
        id
        name
        slug
      }
    }
    childrenCount
    descendants {
      id
      name
      slug
      ancestors {
        id
        name
        slug
      }
    }
    descendantsCount
  }
  woocommerceProductCategoriesCount
}

Diese query ruft eine einzelne Produktkategorie anhand der ID ab:

query FetchProductCategory($categoryId: ID!) {
  woocommerceProductCategory(by: { id: $categoryId }) {
    __typename
    id
    url
    urlPath
    slug
    name
    description
    count
    slugPath
    parentID
    parent {
      id
      name
      slug
    }
    thumbnail {
      id
      src
      altText
      title
      caption
    }
    displayType
    menuOrder
    ancestors {
      id
      name
      slug
    }
    children {
      id
      name
      slug
      parent {
        id
        name
        slug
      }
    }
    childrenCount
    descendants {
      id
      name
      slug
      ancestors {
        id
        name
        slug
      }
    }
    descendantsCount
  }
}

Diese query ruft alle Produkt-Tags ab:

query FetchProductTags {
  woocommerceProductTags {
    __typename
    id
    name
    slug
    url
    urlPath
    description
    count
    thumbnail {
      id
      src
      altText
      title
      caption
    }
    menuOrder
  }
  woocommerceProductTagsCount
}

Diese query ruft einen einzelnen Produkt-Tag anhand der ID ab:

query FetchProductTag($tagId: ID!) {
  woocommerceProductTag(by: { id: $tagId }) {
    __typename
    id
    name
    slug
    url
    urlPath
    description
    count
    thumbnail {
      id
      src
      altText
      title
      caption
    }
    menuOrder
  }
}

Diese query ruft alle Produktmarken ab:

query FetchProductBrands {
  woocommerceProductBrands {
    __typename
    id
    url
    urlPath
    slug
    slugPath
    name
    description
    count
    parentID
    parent {
      id
      name
      slug
    }
    thumbnail {
      id
      src
      altText
      title
      caption
    }
    menuOrder
    ancestors {
      id
      name
      slug
    }
    children {
      id
      name
      slug
      parent {
        id
        name
        slug
      }
    }
    childrenCount
    descendants {
      id
      name
      slug
      ancestors {
        id
        name
        slug
      }
    }
    descendantsCount
  }
  woocommerceProductBrandsCount
}

Diese query ruft eine einzelne Produktmarke anhand der ID ab:

query FetchProductBrand($brandId: ID!) {
  woocommerceProductBrand(by: { id: $brandId }) {
    __typename
    id
    url
    urlPath
    slug
    slugPath
    name
    description
    count
    parentID
    parent {
      id
      name
      slug
    }
    thumbnail {
      id
      src
      altText
      title
      caption
    }
    menuOrder
    ancestors {
      id
      name
      slug
    }
    children {
      id
      name
      slug
      parent {
        id
        name
        slug
      }
    }
    childrenCount
    descendants {
      id
      name
      slug
      ancestors {
        id
        name
        slug
      }
    }
    descendantsCount
  }
}

Attribute und Attribut-Taxonomien

Diese query ruft alle Attribut-Taxonomien ab:

query FetchAttributeTaxonomies {
  woocommerceAttributeTaxonomies {
    __typename
    id
    name
    slug
    type
    orderBy
    taxonomy
    hasArchives
    public
  }
}

Diese query ruft eine einzelne Attribut-Taxonomie anhand der ID ab:

query FetchAttributeTaxonomy($taxonomyId: ID!) {
  woocommerceAttributeTaxonomy(by: { id: $taxonomyId }) {
    __typename
    id
    name
    slug
    type
    orderBy
    taxonomy
    hasArchives
    public
  }
}

Diese query ruft eine Attribut-Taxonomie anhand des Namens ab:

query FetchAttributeTaxonomyByName($taxonomyName: String!) {
  attributeTaxonomyByName: woocommerceAttributeTaxonomy(by: { taxonomyName: $taxonomyName }) {
    __typename
    id
    name
    slug
    type
    orderBy
    taxonomy
    hasArchives
    public
  }
}

Diese query ruft alle Produktattribute ab:

query FetchProductAttributes {
  woocommerceAttributes {
    __typename
    id
    url
    urlPath
    slug
    name
    description
    count
    menuOrder
    termGroup
    termTaxonomyID
    taxonomy
    taxonomyObject {
      id
      name
      slug
      type
      orderBy
      taxonomy
      hasArchives
      public
    }
  }
  woocommerceAttributesCount
}

Diese query ruft ein einzelnes Produktattribut anhand der ID ab:

query FetchProductAttribute($attributeId: ID!) {
  woocommerceAttribute(by: { id: $attributeId }) {
    __typename
    id
    url
    urlPath
    slug
    name
    description
    count
    menuOrder
    termGroup
    termTaxonomyID
    taxonomy
    taxonomyObject {
      id
      name
      slug
      type
      orderBy
      taxonomy
      hasArchives
      public
    }
  }
}

Diese query ruft ein Produktattribut anhand von Slug und Taxonomie ab:

query FetchProductAttributeBySlug($slug: String!, $taxonomy: String!) {
  attributeBySlug: woocommerceAttribute(by: { slug: $slug }, taxonomy: $taxonomy) {
    __typename
    id
    url
    urlPath
    slug
    name
    description
    count
    menuOrder
    termGroup
    termTaxonomyID
    taxonomy
    taxonomyObject {
      id
      name
      slug
      type
      orderBy
      taxonomy
      hasArchives
      public
    }
  }
}

Produkte nach Typ

Einfache Produkte

Diese query ruft alle einfachen Produkte ab:

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
}

Diese query ruft ein einzelnes einfaches Produkt anhand der ID ab:

query FetchSimpleProduct($productId: ID!) {
  woocommerceSimpleProduct(by: { id: $productId }) {
    __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
    }
    galleryImages {
      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
    }
  }
}

Externe Produkte

Diese query ruft alle externen Produkte ab:

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
}

Diese query ruft ein einzelnes externes Produkt anhand der ID ab:

query FetchExternalProduct($productId: ID!) {
  woocommerceExternalProduct(by: { id: $productId }) {
    __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
    }
    galleryImages {
      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
  }
}

Gruppenprodukte

Diese query ruft alle Gruppenprodukte ab:

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
}

Diese query ruft ein einzelnes Gruppenprodukt anhand der ID ab:

query FetchGroupProduct($productId: ID!) {
  woocommerceGroupProduct(by: { id: $productId }) {
    __typename
    id
    name
    slug
    url
    urlPath
    sku
    description
    shortDescription
    status
    type
    featured
    totalSales
    averageRating
    ratingCount
    image {
      id
      src
      altText
      title
      caption
    }
    galleryImages {
      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
    }
  }
}

Variable Produkte

Diese query ruft alle variablen Produkte ab:

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
}

Diese query ruft ein einzelnes variables Produkt anhand der ID ab:

query FetchVariableProduct($productId: ID!) {
  woocommerceVariableProduct(by: { id: $productId }) {
    __typename
    id
    name
    slug
    url
    urlPath
    sku
    description
    shortDescription
    status
    type
    featured
    totalSales
    averageRating
    ratingCount
    image {
      id
      src
      altText
      title
      caption
    }
    galleryImages {
      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
  }
}

Produktvarianten

Diese query ruft alle Produktvarianten ab:

query FetchProductVariations {
  woocommerceProductVariations {
    __typename
    id
    name
    slug
    sku
    description
    shortDescription
    price
    priceFormatted
    regularPrice
    regularPriceFormatted
    salePrice
    salePriceFormatted
    onSale
    status
    image {
      id
      src
      altText
      title
      caption
    }
    # Product variation specific fields
    parentID
    parent {
      id
      name
      slug
      sku
    }
    taxClass
    attributes {
      taxonomy
      termSlug
      termObject {
        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
  }
  woocommerceProductVariationsCount
}

Diese query ruft eine einzelne Produktvariante anhand der ID ab:

query FetchProductVariation($variationId: ID!) {
  woocommerceProductVariation(by: { id: $variationId }) {
    __typename
    id
    name
    slug
    sku
    description
    shortDescription
    price
    priceFormatted
    regularPrice
    regularPriceFormatted
    salePrice
    salePriceFormatted
    onSale
    status
    image {
      id
      src
      altText
      title
      caption
    }
    # Product variation specific fields
    parentID
    parent {
      id
      name
      slug
      sku
    }
    taxClass
    attributes {
      taxonomy
      termSlug
      termObject {
        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
  }
}

Kunden

Diese query ruft alle Kunden ab:

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
}

Diese query ruft einen einzelnen Kunden anhand der ID ab:

query FetchCustomer($customerId: ID!) {
  woocommerceCustomer(by: { id: $customerId }) {
    __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
  }
}

Bestellungen

Diese query ruft alle Bestellungen ab:

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
}

Diese query ruft eine einzelne Bestellung anhand der ID ab:

query FetchOrder($orderId: ID!) {
  woocommerceOrder(by: { id: $orderId }) {
    __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
  }
}

Diese query ruft eine Bestellung anhand des Bestellschlüssels ab:

query FetchOrderByKey($orderKey: String!) {
  orderByKey: woocommerceOrder(by: { orderKey: $orderKey }) {
    id
    orderKey
    orderNumber
    total
    totalFormatted
    status
    date
    customer {
      id
      username
      email
      firstName
      lastName
    }
  }
}

Rückerstattungen

Diese query ruft alle Rückerstattungen ab:

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
}

Diese query ruft eine einzelne Rückerstattung anhand der ID ab:

query FetchRefund($refundId: ID!) {
  woocommerceRefund(by: { id: $refundId }) {
    __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
  }
}

Bewertungen

Diese query ruft alle Produktbewertungen ab:

query FetchProductReviews {
  woocommerceReviews {
    __typename
    id
    content
    author
    authorEmail
    rating
    verified
    approved
    date
    dateStr
    productID
    product {
      id
      name
    }
  }
  woocommerceReviewsCount
}

Diese query ruft eine einzelne Produktbewertung anhand der ID ab:

query FetchProductReview($reviewId: ID!) {
  woocommerceReview(by: { id: $reviewId }) {
    __typename
    id
    content
    author
    authorEmail
    rating
    verified
    approved
    date
    dateStr
    productID
    product {
      id
      name
    }
  }
}

Coupons

Diese query ruft alle Coupons ab:

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
}

Diese query ruft einen Coupon anhand des Codes ab:

query FetchCouponByCode($code: String!) {
  couponByCode: woocommerceCoupon(by: { code: $code }) {
    __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
  }
}

Diese query ruft einen Coupon anhand der ID ab:

query FetchCouponById($couponId: ID!) {
  couponByID: woocommerceCoupon(by: { id: $couponId }) {
    id
    code
    amount
    amountFormatted
    discountType
    description
    usageCount
    individualUse
    usageLimit
    usageLimitPerUser
    freeShipping
    excludeSaleItems
    minimumAmount
    minimumAmountFormatted
    maximumAmount
    maximumAmountFormatted
  }
}

Versandklassen

Diese query ruft alle Versandklassen ab:

query FetchShippingClasses {
  woocommerceShippingClasses {
    __typename
    id
    name
    slug
    description
    count
  }
  woocommerceShippingClassesCount
}

Diese query ruft eine einzelne Versandklasse anhand der ID ab:

query FetchShippingClassById($shippingClassId: ID!) {
  woocommerceShippingClassByID: woocommerceShippingClass(by: { id: $shippingClassId }) {
    __typename
    id
    name
    slug
    description
    count
  }
}

Diese query ruft eine einzelne Versandklasse anhand des Slugs ab:

query FetchShippingClassBySlug($slug: String!) {
  woocommerceShippingClassBySlug: woocommerceShippingClass(by: { slug: $slug }) {
    __typename
    id
    name
    slug
    description
    count
  }
}

Steuersätze

Diese query ruft alle Steuersätze ab:

query FetchTaxRates {
  woocommerceTaxRates {
    __typename
    id
    country
    state
    postcode
    city
    rate
    name
    priority
    compound
    shipping
    order
    class
  }
}

Diese query ruft einen einzelnen Steuersatz anhand der ID ab:

query FetchTaxRate($taxRateId: ID!) {
  woocommerceTaxRate(by: { id: $taxRateId }) {
    __typename
    id
    country
    state
    postcode
    city
    rate
    name
    priority
    compound
    shipping
    order
    class
  }
}

Zahlungs-Gateways

Diese query ruft alle Zahlungs-Gateways ab:

query FetchPaymentGateways {
  woocommercePaymentGateways {
    __typename
    id
    title
    description
    enabled
    methodID
    methodTitle
    methodDescription
    icon
    isAvailable
    isActive
  }
}