graycore / magento2-guest-orders-graphql
一个为访客购物车添加GraphQL订单端点的Magento 2模块。
v0.1.3
2023-06-14 14:20 UTC
Requires
- magento/framework: *
- magento/module-graph-ql: *
- magento/module-quote: *
- magento/module-sales: *
- magento/module-store: *
Requires (Dev)
- magento/magento-coding-standard: >=6.0
- phpunit/phpunit: ^8.2 || ^9.0
- squizlabs/php_codesniffer: ^3.4
README
一个为访客购物车添加GraphQL订单端点的Magento 2模块。此模块与官方客户订单端点的API非常相似。
此模块仅适用于 >= Magento 2.4.1。如果您需要小于 Magento 2.4.1 的订单端点,请使用magento2-orders-graphql。
安装
composer require graycore/magento2-guest-orders-graphql
用法
访客订单
对于访客购物车,使用graycoreGuestOrders
查询,并将购物车ID作为cartId
传入
query GetGuestOrders { graycoreGuestOrders(cartId: "dsfg67dsfg65sd6fgs8dhffdgs") { items { id } } }
模式
有关查询中可用的类型的文档,请参阅GraphQL模式。