承接 oxid-academy/graphql-product 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oxid-academy/graphql-product

Composer 安装命令:

composer require oxid-academy/graphql-product

包简介

Description of the package.

README 文档

README

This module shows how to implement your own queries and mutations.

Install

composer require oxid-academy/graphql-product
vendor/bin/oe-console oe:module:activate oe_graphql_base
vendor/bin/oe-console oe:module:activate oxac_graphql_product

[ ! ] The modules Storefront and/or oxid-academy/graphql-product-extension must be deactivated:

vendor/bin/oe-console oe:module:deactivate oe_graphql_storefront
vendor/bin/oe-console oe:module:deactivate oxac_graphql_productextension

Usage

You can use your favourite GraphQL client to explore the API, if you do not already have one installed, you may use Altair GraphQL Client.

Query

URL: http://localhost/graphql/?shp=1&lang=0

Request

query {
  product (itemNumber: "1402") {
    itemNumber,
    title
  }
}

Response

{
  "data": {
    "product": {
      "itemNumber": "1402",
      "title": "Trapez ION MADTRIXX"
    }
  }
}

Mutation

URL: http://localhost/graphql/?shp=1&lang=0

Request

mutation{
  changeTitle(itemNumber: "1501", title: "Changed Title")
}

Response

{
  "data": {
    "changeTitle": "0584e8b766a4de2177f9ed11d1587f55"
  }
}

Sources

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2021-09-21