swellstores / horizon

Headless NextJS storefront starter powered by Swell
https://swell-horizon-demo.vercel.app/
MIT License
58 stars 52 forks source link

Attribute Id is always "null" #40

Closed agsmartwolf closed 1 year ago

agsmartwolf commented 1 year ago

Hi,

I have a query

query getProduct($slug: String, $currency: String, $locale: String) {
  productBySlug(slug: $slug, _currency: $currency, _locale: $locale) {
    slug
    id
    name
    options {
      id
      attributeId
      name
      values {
        id
        name
        price
      }
    }
    stockLevel
  }
}

The field attributeId is always null right now. There are no ways to detect what is particular attribute id is.

I have custom components depending on attribute id. For example I have a custom "ProductColorOption" - not Select as a default component for all of the options right now.

I could detect what is exactly option attribute before by field attributeId. Now it's always nullable.

Notice: it was okay before. It started to happen probably 1.5-2 weeks ago.

Screenshot 2023-03-06 at 20 49 32
rodrigoddalmeida commented 1 year ago

Hi @agsmartwolf, since this looks related to our API, we'll keep track of the issue in your Discussions post: https://github.com/orgs/swellstores/discussions/166. Closing this one.