WPGraphQL WooCommerce (WooGraphQL)

WPGraphQL WooCommerce

WPGraphQL WooCommerce is a free, open-source WPGraphQL extension that adds WooCommerce functionality to the WPGraphQL API.

In DevelopmentThis plugin is still in the early stages of the development and may contain many bugs or lack some functionality. Using in production is not recommended.

Getting Started

  1. Install & activate WooCommerce
  2. Install & activate WPGraphQL.
  3. (Optional) Install & activate WPGraphQL-JWT-Authentication to add a login mutation that returns a JSON Web Token.
  4. Clone or download the extension & activate the WP GraphQL WooCommerce plugin

Playground

This is a playground connected to the most stable release of the extension.

GraphiQL Loading...
Query as a Customer or Shop ManagerWooGraphQL has many features not available to anomymous user. Try selecting one of the users above and once the indicator on the button is green your logged in.

Here an example queries exclusive to registered customer.

query {
  customer {
    firstName
    lastName
  }
  cart {
    contents {
      nodes {
        product {
          id
          name
          sku
        }
      }
    }
  }
}

Here a query exclusive to shop managers and administrators.

query {
  orders {
    edges {
      cursor
      node {
        id
        orderId
        lineItems {
          nodes {
            itemId
            product {
              id
              name
              price
            }
            quantity
            total
          }
        }
        subtotal
        total
      }
    }
  }
}

Wanna help out?

A KickStarter was created to fund the development of the project.

WP-GraphQL WooCommerce :point_right: KickStarter