【发布时间】:2020-05-24 05:47:11
【问题描述】:
我的问题是我想将我的 Shopify 商店与 gatsby 应用程序连接起来。所以我已经安装了 gatsby-source-shopify,但是当我使用 shopName 和 accessToken 将插件添加到 gatsby-config.js 并尝试运行 gatsby develop 时,站点按预期呈现,但它抛出了这个错误:
gatsby-source-shopify/gatsby-ecommerce-testing starting to fetch data from Shopify
ERROR
error an error occurred while sourcing data
ERROR
query:
"""
query GetCollections($first: Int!, $after: String) {
collections(first: $first, after: $after) {
pageInfo {
hasNextPage
}
edges {
cursor
node {
description
descriptionHtml
handle
id
image {
altText
id
src
}
products(first: 250) {
edges {
node {
id
}
}
}
title
updatedAt
}
}
}
}
"""
variables:
first: 250
after: null
有人知道怎么解决吗?
【问题讨论】:
-
我也遇到了这个问题。我认为这可能是特定于商店或(高)数量的产品,因为当我尝试使用 1 种产品的假商店时,它工作正常。
-
我认为这个问题是因为我没有在 gatsby 应用程序中安装 graphql 插件,但我会检查这是不是真的
-
你有多少产品?你看过 gatsby starter 文件了吗? gatsbyjs.org/starters/AlexanderProd/gatsby-shopify-starter
标签: javascript reactjs graphql gatsby