graycore / magento2-orders-graphql
此包已被弃用,不再维护。没有建议替代包。
一个为 Magento 2 添加了完整功能的 GraphQL 订单端点的模块。
v0.3.1
2020-10-13 23:27 UTC
Requires
- php: >=7.0.0
- magento/framework: *
- magento/module-graph-ql: *
- magento/module-quote: *
- magento/module-sales: *
- magento/module-store: *
Requires (Dev)
- magento/magento-coding-standard: ^5.0
- phpunit/phpunit: ^8.5
- squizlabs/php_codesniffer: ^3.4
README
一个为 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 模式。