@shopify/koa-shopify-graphql-proxy
Advanced tools
Comparing version 5.0.2 to 6.0.0
@@ -9,10 +9,4 @@ 'use strict'; | ||
Object.defineProperty(exports, 'ApiVersion', { | ||
enumerable: true, | ||
get: function () { | ||
return shopifyGraphqlProxy.ApiVersion; | ||
} | ||
}); | ||
exports.GRAPHQL_PATH_PREFIX = shopifyGraphqlProxy.GRAPHQL_PATH_PREFIX; | ||
exports.PROXY_BASE_PATH = shopifyGraphqlProxy.PROXY_BASE_PATH; | ||
exports.default = shopifyGraphqlProxy['default']; |
@@ -13,15 +13,2 @@ 'use strict'; | ||
const GRAPHQL_PATH_PREFIX = '/admin/api'; | ||
exports.ApiVersion = void 0; | ||
(function (ApiVersion) { | ||
ApiVersion["July19"] = "2019-07"; | ||
ApiVersion["October19"] = "2019-10"; | ||
ApiVersion["January20"] = "2020-01"; | ||
ApiVersion["April20"] = "2020-04"; | ||
ApiVersion["July20"] = "2020-07"; | ||
ApiVersion["October20"] = "2020-10"; | ||
ApiVersion["Unstable"] = "unstable"; | ||
ApiVersion["Unversioned"] = "unversioned"; | ||
})(exports.ApiVersion || (exports.ApiVersion = {})); | ||
function shopifyGraphQLProxy(proxyOptions) { | ||
@@ -28,0 +15,0 @@ return async function shopifyGraphQLProxyMiddleware(ctx, next) { |
import { Context } from 'koa'; | ||
export declare const PROXY_BASE_PATH = "/graphql"; | ||
export declare const GRAPHQL_PATH_PREFIX = "/admin/api"; | ||
export declare enum ApiVersion { | ||
July19 = "2019-07", | ||
October19 = "2019-10", | ||
January20 = "2020-01", | ||
April20 = "2020-04", | ||
July20 = "2020-07", | ||
October20 = "2020-10", | ||
Unstable = "unstable", | ||
Unversioned = "unversioned" | ||
} | ||
export declare type ApiVersion = '2020-10' | '2021-01' | '2021-04' | '2021-07' | 'unstable' | 'unversioned' | (string & {}); | ||
interface DefaultProxyOptions { | ||
@@ -15,0 +6,0 @@ version: ApiVersion; |
{ | ||
"name": "@shopify/koa-shopify-graphql-proxy", | ||
"version": "5.0.2", | ||
"version": "6.0.0", | ||
"license": "MIT", | ||
@@ -50,3 +50,3 @@ "description": "A wrapper around `koa-better-http-proxy` which allows easy proxying of GraphQL requests from an embedded Shopify app", | ||
}, | ||
"gitHead": "798d03d90b914be7bcd43092910840fb7d58866f" | ||
"gitHead": "71764912db9d5ba88805eb791d705e63201a029d" | ||
} |
@@ -28,3 +28,3 @@ # `@shopify/koa-shopify-graphql-proxy` | ||
import createShopifyAuth from '@shopify/koa-shopify-auth'; | ||
import proxy, {ApiVersion} from '@shopify/koa-shopify-graphql-proxy'; | ||
import proxy from '@shopify/koa-shopify-graphql-proxy'; | ||
@@ -41,3 +41,3 @@ const app = koa(); | ||
app.use(proxy({version: ApiVersion.Unstable})); | ||
app.use(proxy({version: 'unstable'})); | ||
``` | ||
@@ -61,3 +61,3 @@ | ||
app.use(mount('/shopify', proxy({version: ApiVersion.Unstable})); | ||
app.use(mount('/shopify', proxy({version: 'unstable'})); | ||
``` | ||
@@ -78,3 +78,3 @@ | ||
import session from 'koa-session'; | ||
import proxy, {ApiVersion} from '@shopify/koa-shopify-graphql-proxy'; | ||
import proxy from '@shopify/koa-shopify-graphql-proxy'; | ||
@@ -87,3 +87,3 @@ const app = koa(); | ||
proxy({ | ||
version: ApiVersion.Unstable, | ||
version: 'unstable', | ||
shop: '<my-shop-name>.myshopify.com', | ||
@@ -90,0 +90,0 @@ password: '<your-app-password>', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13245
16
131