UNPKG

@shopify/koa-shopify-graphql-proxy

Version:

A wrapper around `koa-better-http-proxy` which allows easy proxying of GraphQL requests from an embedded Shopify app

24 lines 809 B
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" } interface DefaultProxyOptions { version: ApiVersion; } interface PrivateShopOption extends DefaultProxyOptions { password: string; shop: string; } declare type ProxyOptions = PrivateShopOption | DefaultProxyOptions; export default function shopifyGraphQLProxy(proxyOptions: ProxyOptions): (ctx: Context, next: () => Promise<any>) => Promise<void>; export {}; //# sourceMappingURL=shopify-graphql-proxy.d.ts.map