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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-codegen-preset] Cannot query field "category" on type "Product" #1864

Open
5 tasks
minemos opened this issue Dec 11, 2024 · 0 comments
Open
5 tasks

[api-codegen-preset] Cannot query field "category" on type "Product" #1864

minemos opened this issue Dec 11, 2024 · 0 comments

Comments

@minemos
Copy link

minemos commented Dec 11, 2024

Issue summary

Before opening this issue, I have:

  • Upgraded to the latest version of the relevant packages
    • @shopify/* package and version: @shopify/api-codegen-preset 1.1.3
    • Node version: v18.20.5
    • Operating system: MacOS
  • Set { logger: { level: LogSeverity.Debug } } in my configuration, when applicable
  • Found a reliable way to reproduce the problem that indicates it's a problem with the package
  • Looked for similar issues in this repository
  • Checked that this isn't an issue with a Shopify API

I think this not load 2024-10 version api schema

Expected behavior

What do you think should happen?

No validation error

Actual behavior

What actually happens?

Error 0: Cannot query field "category" on type "Product"
Error 1: Cannot query field "optionValues" on type "ProductOption"

Steps to reproduce the problem

  1. query product
query getProductDetail {
  product(id: "") {
    id
    availableForSale
    title
    description
    handle
    category {
      name
    }
    productType
    descriptionHtml
    calories: metafield(namespace: "custom", key: "calories") {
      value
    }
    options {
      name
      optionValues {
        id
        name
        firstSelectableVariant {
          availableForSale
          currentlyNotInStock
          quantityRule {
            increment
            maximum
            minimum
          }
          price {
            amount
          }
        }
      }
    }
    media(first: 10) {
      nodes {
        mediaContentType
        previewImage {
          url
          altText
          width
          height
        }
      }
    }
    seo {
      title
      description
    }
    tags
    compareAtPriceRange {
      maxVariantPrice {
        amount
        currencyCode
      }
      minVariantPrice {
        amount
        currencyCode
      }
    }
    priceRange {
      maxVariantPrice {
        amount
        currencyCode
      }
      minVariantPrice {
        amount
        currencyCode
      }
    }
  }
}

Debug logs

Error 0: Cannot query field "category" on type "Product"
Error 1: Cannot query field "optionValues" on type "ProductOption"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant