Skip to content

oxid-academy/graphql-product-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This module is extending the Storefront Product object by adding two new fields: itemNumber and subtitle.

itemNumber

A wrapper for the field oxarticles__oxartnum and shows the basic functionality.

subtitle

Represent a custom field of the table oxarticles_oxartnum. To keep things simple an existing field is taken and the value just changed.

Install

composer require oxid-academy/graphql-product-extension
vendor/bin/oe-console oe:module:activate oe_graphql_storefront
vendor/bin/oe-console oe:module:activate oxac_graphql_productextension

[ ! ] The module oxid-academy/graphql-product must be deactivated:

vendor/bin/oe-console oe:module:deactivate oxac_graphql_product

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 (productId: "05848170643ab0deb9914566391c0c63") {
    itemNumber,
    subtitle
  }
}

Response

{
  "data": {
    "product": {
      "itemNumber": "1402",
      "subtitle": "sadsadasd <-> dsadasdas"
    }
  }
}

Sources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages