Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

A Magento 2 module that adds a fully featured GraphQL orders endpoint.

License

Notifications You must be signed in to change notification settings

graycoreio/magento2-orders-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magento2-orders-graphql

Build Status

A Magento 2 module that adds a fully featured GraphQL orders endpoint.

Note that this is scheduled to be obsolete and deprecated in Magento 2.4.1 given that an officially maintained GraphQL order module will be released.

Installation

composer require graycore/magento2-orders-graphql

Usage

Guest Orders

For guest carts, use the graycoreGuestOrders query and pass in the cart ID as cartId:

query GetGuestOrders {
  graycoreGuestOrders(cartId: "dsfg67dsfg65sd6fgs8dhffdgs") {
    orders {
      id
    }
  }
}

Customer Orders

For customer carts, use the graycoreCustomerOrders query. There is an optional orderNumber parameter which will return a specific order. Not passing orderNumber will return all of the authenticated customer's orders. Authenticate the customer according to normal Magento procedures.

query GetCustomerOrders {
  graycoreCustomerOrders(
    orderNumber: "0000000001"
  ) {
    orders {
      id
    }
  }
}

Schema

Refer to the GraphQL schema for documentation about the types available in the queries.

About

A Magento 2 module that adds a fully featured GraphQL orders endpoint.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published