Skip to content

vtex-apps/buybox-graphql

Repository files navigation

Buybox GraphQL

Source code

⚠️ This app is no longer maintained by VTEX. This means support and maintenance are no longer provided.

This app exports a GraphQL schema to sort sellers on buybox-context.

Installation

To use it in your app, add the following dependency in the manifest.json file:

  "dependencies": {
    "vtex.buybox-graphql": "0.x"
  }

This app is used on buybox-context, but you may then use it in your front-end component as well.

To resolve this query, you must have an app installed in your workspace that implements the GraphQL interface. Currently, those are the available resolvers:

Having zero or more than one resolver installed will result in an error.

Examples

Using this resolver, you can provide information about the Product and Shipping to get an array of sorted sellers. The returned array is a list of sellerId values.

query SortSellersProtocol {
  sortSellers(skuId: "33", postalCode: "00000000", country: "BRA", salesChannel: 1) {
    sellers
  }
}

This returns sellers' IDs inside the Product. Here's a possible response for the execution of this query:

{
  "data": {
    "sortSellers": {
      sellers: ["seller1", "seller3", "seller4", "otherSeller"]
    }
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Generated from vtex-apps/graphql-example