我正在为我的Shopify应用程序设置一个应用程序卸载网络挂钩。我在Shopify Developer中的应用程序设置为最新的API(2021-01)。
然而,当我注册我的webhook时,没有ApiVersion选项。1月21日。当我将其设置为1月21日时,我得到以下结果:
error: invalid JSON response body at https://test-sonder.myshopify.com/admin/api/undefined/graphql.json reason: Unexpected end of JSON input.
这是我的server.js
const { ApiVersion } = require('@shopify/koa-shopify-graphql-proxy');
const registration = await registerWebhook({
address: `${HOST}/webhooks/apps/uninstall`,
topic: 'APP_UNINSTALLED',
accessToken,
shop,
apiVersion: ApiVersion.January21
});
我的package.json
{
"dependencies": {
"@koa/router": "^10.0.0",
"@shopify/app-bridge-react": "^1.28.0",
"@shopify/koa-shopify-auth": "^3.2.0",
"@shopify/koa-shopify-graphql-proxy": "^4.1.0",
"@shopify/koa-shopify-webhooks": "^2.6.0",
"@shopify/polaris": "^5.12.0",
"@zeit/next-css": "^1.0.1",
"apollo-boost": "^0.4.9",
"axios": "^0.21.1",
"dotenv": "^8.2.0",
"graphql": "^15.4.0",
"isomorphic-fetch": "^3.0.0",
"koa": "^2.13.1",
"koa-router": "^8.0.8",
"koa-session": "^6.1.0",
"next": "^10.0.4",
"ngrok": "^3.4.0",
"react": "16.9.0",
"react-apollo": "^3.1.5",
"react-dom": "16.9.0",
"react-html-parser": "^2.0.2",
"react-player": "^2.7.2",
"store-js": "^2.0.4"
}
}
从v6开始。0.0枚举已更新为包含新版本,但TypeScript类型已更改为更松散的字符串联合类型,以允许任意版本,因此即使库落后,您也可以使用任何版本。
他们仍然必须把它添加到包装中。
您可以在这里看到SRC代码https://github.com/Shopify/quilt/blob/master/packages/koa-shopify-graphql-proxy/src/shopify-graphql-proxy.ts你会注意到这个版本还没有出现(在写这个答案时)。
如果您需要最新的API,可以使用unstable
版本;如果您不想寻找API最近发布的内容,可以切换到October20
版本。
@shopify/koa-shopify-auth Middleware to authenticate a Koa application with Shopify. Sister module to @shopify/shopify-express, but simplified. Features you might know from the express module like the
如何从shopify Graphql api获取订单列表?我甚至不知道如何得到一个订单。我能说的最近的一点是,我的查询应该是这样的: 根据文档,其中,
Dawn 代表了一种以 HTML 为先,只需要 JavaScript 的主题开发方法。它是 Shopify 第一个内置性能、灵活性和 Online Store 2.0 功能的可用主题源,并作为构建 Shopify 主题的参考。 特性: 最纯粹形式的网络原生 精益、快速和可靠 JavaScript 不是必需的 服务器呈现 功能性 入门 Fork 存储库并克隆它: git clone git@gith
Shopify Packer Modern development tool for Shopify using Webpack 5. Easy to extend and customize, zero build config, comes with starter themes and compatible with existing Shopify sites. Features Webp
Laravel Shopify App A full-featured Laravel package for aiding in Shopify App development, similar to shopify_app for Rails. Works for Laravel 7 and up. Table of Contents * Wiki pages Goals Documentat
Polaris 是 Shopify 的体验平台,该存储库专注于集中系统、文档和基础。 如何使用这个 repo 确保计算机上安装了 Git 和 Node.js,然后运行以下命令开始: $ git clone https://github.com/Shopify/polaris.git # git clone repository$ cd polaris
Shopify ThemeKit - Webpack Development tool for Shopify using webpack and themekit. Check out the node package version: Shopify Packer Requirements Getting Started Theme files Commands Features Ready
generator-shopify-nextjs A Yeoman generator for Serverless Shopify apps using Next.js, Koa, Prisma GraphQL & Shopify's Polaris The Stack next.js koa koa-shopify-auth koa-shopify-graphql-proxy Polaris