graycore/magento2-orders-graphql

此包已被弃用,不再维护。没有建议替代包。

一个为 Magento 2 添加了完整功能的 GraphQL 订单端点的模块。

资助包维护!
graycoreio

安装: 149

依赖项: 0

建议者: 0

安全性: 0

星标: 1

关注者: 2

分支: 0

开放问题: 0

类型:magento2-module

v0.3.1 2020-10-13 23:27 UTC

This package is auto-updated.

Last update: 2020-11-13 23:46:03 UTC


README

Build Status

一个为 Magento 2 添加了完整功能的 GraphQL 订单端点的模块。

注意,由于将发布官方维护的 GraphQL 订单模块,因此该模块计划在 Magento 2.4.1 中废弃和弃用。

安装

composer require graycore/magento2-orders-graphql

用法

访客订单

对于访客购物车,请使用 graycoreGuestOrders 查询,并将购物车 ID 作为 cartId 传入

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

客户订单

对于客户购物车,请使用 graycoreCustomerOrders 查询。有一个可选的 orderNumber 参数,可以返回特定订单。不传递 orderNumber 将返回所有经过身份验证的客户订单。请根据正常的 Magento 程序对客户进行身份验证。

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

模式

有关查询中可用类型的文档,请参阅 GraphQL 模式