Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Data: Inconsistent GraphQL Response #1181

Closed
jonasivy opened this issue Aug 3, 2023 · 6 comments
Closed

馃悰 Data: Inconsistent GraphQL Response #1181

jonasivy opened this issue Aug 3, 2023 · 6 comments
Labels
Storefront API Issues related to https://shopify.dev/docs/api/storefront

Comments

@jonasivy
Copy link

jonasivy commented Aug 3, 2023

What is the location of your example repository?

No response

Which package or tool is having this issue?

Storefront API

What version of that package or tool are you using?

2023-04

What version of Remix are you using?

"@remix-run/react": "1.17.1"

Steps to Reproduce

Contents of our website is based on Metaobject of shopify. Noticed that the return contents differ every time I refresh.

Query:

fragment MediaImageFragment on MediaImage {
  id
  __typename
  mediaContentType
  image {
    id
    width
    height
    url
    altText
  }
}

fragment BadgesFragment on Metaobject {
  internalName: field(key: "internal_name") {
    value
  }
  text: field(key: "text") {
    value
  }
  colorTheme: field(key: "color_theme") {
    reference {
      ... on Metaobject {
        ...ColorThemeFragment
      }
    }
  }
  backgroundColor: field(key: "background_color") {
    value
  }
  fontColor: field(key: "font_color") {
    value
  }
  image: field(key: "image") {
    reference {
      ... on MediaImage {
        ...MediaImageFragment
      }
    }
  }
  visibility: field(key: "visibility") {
    value
  }
}

fragment ColorThemeFragment on Metaobject {
  internalName: field(key: "internal_name") {
    value
  }
  backgroundColor: field(key: "background_color") {
    value
  }
  fontColor: field(key: "font_color") {
    value
  }
}

query PDPProductContent($handle: String!) {
  product(handle: $handle) {
    handle
    badges: metafield(namespace: "custom", key: "badges") {
      references(first: 10) {
        nodes {
          ... on Metaobject {
            ...BadgesFragment
          }
        }
      }
    }
  }
}

Variable:

{
  "handle": "oru-paddle"
}

Inconsistency comes from the previous value of the Metaobject and the current value.

https://www.loom.com/share/db08412468ea4e5fa6be9c935afbce2b?sid=f4a4aaae-595e-452d-87dc-0fc43e5c32d6

Expected Behavior

Consistent response based on store metaobject data.

Actual Behavior

Unstable Response

@jonasivy
Copy link
Author

jonasivy commented Aug 7, 2023

Hi team, any update on this issue?

@blittle
Copy link
Contributor

blittle commented Aug 7, 2023

Hi @jonasivy, we are digging into this on our end and will give you an update soon.

@juanpprieto
Copy link
Contributor

Thanks for reporting @jonasivy. This issue has been reported internally, but it may be worth opening directly in the Storefront API feedback repo

@jonasivy
Copy link
Author

jonasivy commented Aug 7, 2023

Thanks for the update @blittle, let me know if you need any additional info to help you with the investigation.

@juanpprieto juanpprieto added the Storefront API Issues related to https://shopify.dev/docs/api/storefront label Aug 7, 2023
@jonasivy
Copy link
Author

jonasivy commented Aug 7, 2023

@juanpprieto, am about to file a ticket but found this ticket here. Looks like we have the same issue.

@blittle
Copy link
Contributor

blittle commented Jun 21, 2024

Closing the issue here, as it's reported with the SFAPI and that's where the problem is.

@blittle blittle closed this as completed Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storefront API Issues related to https://shopify.dev/docs/api/storefront
Projects
None yet
Development

No branches or pull requests

3 participants