S_competition

Gets the information about products' available auctions.

Supported arguments

The following arguments are supported by S_competition query:

FieldTypeDescription
productIds[S_Uuid!]!List of product ids to fetch competition for. Maximum 100 at the time

Return type

The query returns the [S_API_Competition!] type.

Example usage

Query

Here we are asking information about available auctions for a single product

query {
  S_competition(productIds: ["29778daa-681f-11e9-a36a-5e8c1cf5c171"]) {
    productId
    competition(first: 10) { # Max 50
      totalCount # Total count of auctions
      edges {
        node {
          belongsToYou
          merchantName
          price {
            amount
            currency
          }
        }
      }
    }
  }
}

Example Response

{
  "data": {
    "S_competition": [
      {
        "productId": "29778daa-681f-11e9-a36a-5e8c1cf5c171",
        "competition": {
          "totalCount": 3,
          "edges": [
            {
              "node": {
                "belongsToYou": false,
                "merchantName": "Merchant 1",
                "price": {
                  "amount": 413,
                  "currency": "EUR"
                }
              }
            },
            {
              "node": {
                "belongsToYou": true,
                "merchantName": "Merchant 2",
                "price": {
                  "amount": 425,
                  "currency": "EUR"
                }
              }
            },
            {
              "node": {
                "belongsToYou": false,
                "merchantName": "Merchant 3",
                "price": {
                  "amount": 429,
                  "currency": "EUR"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
Copyright 2024 Eneba. All Rights Reserved. JSC “Helis play”, Gyneju St. 4-333, Vilnius, the Republic of Lithuania