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

15 lines 735 B
import type { Context } from 'koa'; export declare const PROXY_BASE_PATH = "/graphql"; export declare const GRAPHQL_PATH_PREFIX = "/admin/api"; export type ApiVersion = '2020-10' | '2021-01' | '2021-04' | '2021-07' | '2021-10' | '2022-01' | '2022-04' | '2022-07' | '2022-10' | 'unstable' | 'unversioned' | (string & {}); interface DefaultProxyOptions { version: ApiVersion; } interface PrivateShopOption extends DefaultProxyOptions { password: string; shop: string; } 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