From 83b8bfc78fe0d683d5939664d193618ee25fea5a Mon Sep 17 00:00:00 2001 From: Elizabeth Kenyon Date: Tue, 3 Dec 2024 15:53:13 -0600 Subject: [PATCH 1/2] Update App Proxy Form documenation Clarify limiations with remix url rewriting --- .../docs/generated/generated_docs_data.json | 123 ++++++++++++++++-- .../components/AppProxyForm/AppProxyForm.tsx | 13 +- .../AppProxyProvider/AppProxyProvider.doc.ts | 4 +- 3 files changed, 125 insertions(+), 15 deletions(-) diff --git a/packages/apps/shopify-app-remix/docs/generated/generated_docs_data.json b/packages/apps/shopify-app-remix/docs/generated/generated_docs_data.json index 3a8d39e8cd..fd15e751b1 100644 --- a/packages/apps/shopify-app-remix/docs/generated/generated_docs_data.json +++ b/packages/apps/shopify-app-remix/docs/generated/generated_docs_data.json @@ -129,7 +129,7 @@ }, { "name": "AppProxyForm", - "description": "Sets up a Remix `
` component that works when rendered behind an app proxy.\n\nSupports any properties accepted by the `` component.", + "description": "Sets up a Remix `` component that works when rendered on an app proxy page.\n\nSupports any properties accepted by the `` component.\n\nBecause Remix doesn't support URL rewriting, any route using this component should match the pathname of the proxy URL exactly, and end in a trailing slash (e.g., `https:///apps/proxy/`), or set the Remix Form prop `navigate` to `false`.", "category": "App proxy components", "type": "component", "isVisualComponent": false, @@ -157,8 +157,8 @@ "title": "Render a form element in a proxied route", "tabs": [ { - "title": "/app/routes/**\\/*.ts", - "code": "import {\n AppProxyProvider,\n AppProxyForm,\n} from \"@shopify/shopify-app-remix/react\";\nimport { authenticate } from \"~/shopify.server\";\n\nexport async function loader({ request }) {\n await authenticate.public.appProxy(request);\n\n return json({ appUrl: process.env.SHOPIFY_APP_URL });\n}\n\nexport async function action({ request }) {\n await authenticate.public.appProxy(request);\n\n const formData = await request.formData();\n const field = formData.get(\"field\")?.toString();\n\n // Perform actions\n if (field) {\n console.log(\"Field:\", field);\n }\n\n // Return JSON to the client\n return json({ message: \"Success!\" });\n}\n\nexport default function App() {\n const { appUrl } = useLoaderData();\n const data = useActionData();\n\n return (\n <AppProxyProvider appUrl={appUrl}>\n <AppProxyForm action=\"/\">\n <input type=\"text\" name=\"field\" defaultValue={data?.field} />\n\n <input type=\"submit\" name=\"Submit\" />\n </AppProxyForm>\n </AppProxyProvider>\n );\n}", + "title": "/app/routes/apps/appProxy.ts", + "code": "import {\n AppProxyProvider,\n AppProxyForm,\n} from \"@shopify/shopify-app-remix/react\";\nimport { authenticate } from \"~/shopify.server\";\n\nexport async function loader({ request }) {\n await authenticate.public.appProxy(request);\n\n return json({ appUrl: process.env.SHOPIFY_APP_URL });\n}\n\nexport async function action({ request }) {\n await authenticate.public.appProxy(request);\n\n const formData = await request.formData();\n const field = formData.get(\"field\")?.toString();\n\n // Perform actions\n if (field) {\n console.log(\"Field:\", field);\n }\n\n // Return JSON to the client\n return json({ message: \"Success!\" });\n}\n\nexport default function App() {\n const { appUrl } = useLoaderData();\n\n return (\n <AppProxyProvider appUrl={appUrl}>\n <AppProxyForm action=\"/apps/appProxy\" method=\"post\">\n <input type=\"text\" name=\"field\" />\n\n <input type=\"submit\" name=\"Submit\" />\n </AppProxyForm>\n </AppProxyProvider>\n );\n}", "language": "typescript" } ] @@ -254,13 +254,13 @@ { "name": "AppProxyForm", "subtitle": "Render form elements in proxies.", - "url": "/docs/api/shopify-app-remix/app-proxy-components/appproxy-form", + "url": "/docs/api/shopify-app-remix/app-proxy-components/appproxyform", "type": "remix" }, { "name": "AppProxyLink", "subtitle": "Render link elements in proxies.", - "url": "/docs/api/shopify-app-remix/app-proxy-components/appproxy-link", + "url": "/docs/api/shopify-app-remix/app-proxy-components/appproxylink", "type": "remix" } ], @@ -317,6 +317,48 @@ "value": "EmbeddedTypedAdminContext & ScopesContext", "description": "" }, + "FeatureEnabled": { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "FeatureEnabled", + "value": "Future extends FutureFlags\n ? Future[Flag] extends true\n ? true\n : false\n : false", + "description": "" + }, + "FutureFlags": { + "filePath": "src/server/future/flags.ts", + "name": "FutureFlags", + "description": "", + "members": [ + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "removeRest", + "value": "boolean", + "description": "When enabled, methods for interacting with the admin REST API will not be returned.\n\nThis affects:\n\n* `authenticate.admin(request)` * `authenticate.webhook(request)` * `authenticate.flow(request)` * `authenticate.appProxy(request)` * `authenticate.fulfillmentService(request)` * `unauthenticated.admin(shop)`\n\nIn a future release we will remove REST from the package completely.\n\nPlease see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)", + "isOptional": true, + "defaultValue": "false" + }, + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "unstable_newEmbeddedAuthStrategy", + "value": "boolean", + "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", + "isOptional": true, + "defaultValue": "false" + }, + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "wip_optionalScopesApi", + "value": "boolean", + "description": "When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.", + "isOptional": true, + "defaultValue": "false" + } + ], + "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.\n *\n * @default false\n */\n wip_optionalScopesApi?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" + }, "EmbeddedTypedAdminContext": { "filePath": "src/server/authenticate/admin/types.ts", "syntaxKind": "TypeAliasDeclaration", @@ -4020,6 +4062,7 @@ "AdminApiContext": { "filePath": "src/server/clients/admin/types.ts", "syntaxKind": "TypeAliasDeclaration", + "syntaxKind": "TypeAliasDeclaration", "name": "AdminApiContext", "value": "FeatureEnabled extends true\n ? AdminApiContextWithoutRest\n : AdminApiContextWithRest", "description": "" @@ -4053,9 +4096,18 @@ "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", "isOptional": true, "defaultValue": "false" + }, + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "wip_optionalScopesApi", + "value": "boolean", + "description": "When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.", + "isOptional": true, + "defaultValue": "false" } ], - "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" + "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.\n *\n * @default false\n */\n wip_optionalScopesApi?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" }, "AdminApiContextWithoutRest": { "filePath": "src/server/clients/admin/types.ts", @@ -4100,6 +4152,9 @@ ] } ], + "value": "export interface AdminApiContextWithoutRest {\n /**\n * Methods for interacting with the Shopify Admin GraphQL API\n *\n * {@link https://shopify.dev/docs/api/admin-graphql}\n * {@link https://github.com/Shopify/shopify-app-js/blob/main/packages/apps/shopify-api/docs/reference/clients/Graphql.md}\n *\n * @example\n * Querying the GraphQL API.\n * Use `admin.graphql` to make query / mutation requests.\n * ```ts\n * // /app/routes/**\\/*.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { admin } = await authenticate.admin(request);\n *\n * const response = await admin.graphql(\n * `#graphql\n * mutation populateProduct($input: ProductInput!) {\n * productCreate(input: $input) {\n * product {\n * id\n * }\n * }\n * }`,\n * {\n * variables: {\n * input: { title: \"Product Name\" },\n * },\n * },\n * );\n *\n * const productData = await response.json();\n * return json({\n * productId: productData.data?.productCreate?.product?.id,\n * });\n * }\n * ```\n *\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n *\n * @example\n * Handling GraphQL errors.\n * Catch `GraphqlQueryError` errors to see error messages from the API.\n * ```ts\n * // /app/routes/**\\/*.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { admin } = await authenticate.admin(request);\n *\n * try {\n * const response = await admin.graphql(\n * `#graphql\n * query incorrectQuery {\n * products(first: 10) {\n * nodes {\n * not_a_field\n * }\n * }\n * }`,\n * );\n *\n * return json({ data: await response.json() });\n * } catch (error) {\n * if (error instanceof GraphqlQueryError) {\n * // error.body.errors:\n * // { graphQLErrors: [\n * // { message: \"Field 'not_a_field' doesn't exist on type 'Product'\" }\n * // ] }\n * return json({ errors: error.body?.errors }, { status: 500 });\n * }\n * return json({ message: \"An error occurred\" }, { status: 500 });\n * }\n * }\n * ```\n *\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n */\n graphql: GraphQLClient;\n}" + } + ], "value": "export interface AdminApiContextWithoutRest {\n /**\n * Methods for interacting with the Shopify Admin GraphQL API\n *\n * {@link https://shopify.dev/docs/api/admin-graphql}\n * {@link https://github.com/Shopify/shopify-app-js/blob/main/packages/apps/shopify-api/docs/reference/clients/Graphql.md}\n *\n * @example\n * Querying the GraphQL API.\n * Use `admin.graphql` to make query / mutation requests.\n * ```ts\n * // /app/routes/**\\/*.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { admin } = await authenticate.admin(request);\n *\n * const response = await admin.graphql(\n * `#graphql\n * mutation populateProduct($input: ProductInput!) {\n * productCreate(input: $input) {\n * product {\n * id\n * }\n * }\n * }`,\n * {\n * variables: {\n * input: { title: \"Product Name\" },\n * },\n * },\n * );\n *\n * const productData = await response.json();\n * return json({\n * productId: productData.data?.productCreate?.product?.id,\n * });\n * }\n * ```\n *\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n *\n * @example\n * Handling GraphQL errors.\n * Catch `GraphqlQueryError` errors to see error messages from the API.\n * ```ts\n * // /app/routes/**\\/*.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { admin } = await authenticate.admin(request);\n *\n * try {\n * const response = await admin.graphql(\n * `#graphql\n * query incorrectQuery {\n * products(first: 10) {\n * nodes {\n * not_a_field\n * }\n * }\n * }`,\n * );\n *\n * return json({ data: await response.json() });\n * } catch (error) {\n * if (error instanceof GraphqlQueryError) {\n * // error.body.errors:\n * // { graphQLErrors: [\n * // { message: \"Field 'not_a_field' doesn't exist on type 'Product'\" }\n * // ] }\n * return json({ errors: error.body?.errors }, { status: 500 });\n * }\n * return json({ message: \"An error occurred\" }, { status: 500 });\n * }\n * }\n * ```\n *\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n */\n graphql: GraphQLClient;\n}" }, "GraphQLClient": { @@ -4894,6 +4949,48 @@ "value": "EmbeddedTypedAdminContext & ScopesContext", "description": "" }, + "FeatureEnabled": { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "FeatureEnabled", + "value": "Future extends FutureFlags\n ? Future[Flag] extends true\n ? true\n : false\n : false", + "description": "" + }, + "FutureFlags": { + "filePath": "src/server/future/flags.ts", + "name": "FutureFlags", + "description": "", + "members": [ + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "removeRest", + "value": "boolean", + "description": "When enabled, methods for interacting with the admin REST API will not be returned.\n\nThis affects:\n\n* `authenticate.admin(request)` * `authenticate.webhook(request)` * `authenticate.flow(request)` * `authenticate.appProxy(request)` * `authenticate.fulfillmentService(request)` * `unauthenticated.admin(shop)`\n\nIn a future release we will remove REST from the package completely.\n\nPlease see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)", + "isOptional": true, + "defaultValue": "false" + }, + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "unstable_newEmbeddedAuthStrategy", + "value": "boolean", + "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", + "isOptional": true, + "defaultValue": "false" + }, + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "wip_optionalScopesApi", + "value": "boolean", + "description": "When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.", + "isOptional": true, + "defaultValue": "false" + } + ], + "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.\n *\n * @default false\n */\n wip_optionalScopesApi?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" + }, "EmbeddedTypedAdminContext": { "filePath": "src/server/authenticate/admin/types.ts", "syntaxKind": "TypeAliasDeclaration", @@ -8682,13 +8779,23 @@ { "filePath": "src/server/future/flags.ts", "syntaxKind": "PropertySignature", - "name": "unstable_newEmbeddedAuthStrategy", + "name": "removeRest", "value": "boolean", - "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", + "description": "When enabled, methods for interacting with the admin REST API will not be returned.\n\nThis affects:\n\n* `authenticate.admin(request)` * `authenticate.webhook(request)` * `authenticate.flow(request)` * `authenticate.appProxy(request)` * `authenticate.fulfillmentService(request)` * `unauthenticated.admin(shop)`\n\nIn a future release we will remove REST from the package completely.\n\nPlease see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)", + "isOptional": true, + "defaultValue": "false" + }, + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "wip_optionalScopesApi", + "value": "boolean", + "description": "When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.", "isOptional": true, "defaultValue": "false" } ], + "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.\n *\n * @default false\n */\n wip_optionalScopesApi?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" } } diff --git a/packages/apps/shopify-app-remix/src/react/components/AppProxyForm/AppProxyForm.tsx b/packages/apps/shopify-app-remix/src/react/components/AppProxyForm/AppProxyForm.tsx index bfff042375..ca69c36ceb 100644 --- a/packages/apps/shopify-app-remix/src/react/components/AppProxyForm/AppProxyForm.tsx +++ b/packages/apps/shopify-app-remix/src/react/components/AppProxyForm/AppProxyForm.tsx @@ -8,15 +8,19 @@ export interface AppProxyFormProps extends FormProps { } /** - * Sets up a Remix `` component that works when rendered behind an app proxy. + * Sets up a Remix `` component that works when rendered on an app proxy page. * * Supports any properties accepted by the `` component. * + * Because Remix doesn't support URL rewriting, any route using this component should match the pathname of the proxy + * URL exactly, and end in a trailing slash (e.g., `https:///apps/proxy/`), or set the Remix Form prop + * `navigate` to `false`. + * * @example * Render a form element in a proxied route. * Use an `AppProxyForm` within an `AppProxy` to create a form. * ```ts - * // /app/routes/**\/*.ts + * // /app/routes/apps/appProxy.ts * import { * AppProxyProvider, * AppProxyForm, @@ -46,12 +50,11 @@ export interface AppProxyFormProps extends FormProps { * * export default function App() { * const { appUrl } = useLoaderData(); - * const data = useActionData(); * * return ( * - * - * + * + * * * * diff --git a/packages/apps/shopify-app-remix/src/react/components/AppProxyProvider/AppProxyProvider.doc.ts b/packages/apps/shopify-app-remix/src/react/components/AppProxyProvider/AppProxyProvider.doc.ts index da5bb20457..24a9513386 100644 --- a/packages/apps/shopify-app-remix/src/react/components/AppProxyProvider/AppProxyProvider.doc.ts +++ b/packages/apps/shopify-app-remix/src/react/components/AppProxyProvider/AppProxyProvider.doc.ts @@ -25,13 +25,13 @@ const data: ReferenceEntityTemplateSchema = { { name: 'AppProxyForm', subtitle: 'Render form elements in proxies.', - url: '/docs/api/shopify-app-remix/app-proxy-components/appproxy-form', + url: '/docs/api/shopify-app-remix/app-proxy-components/appproxyform', type: 'remix', }, { name: 'AppProxyLink', subtitle: 'Render link elements in proxies.', - url: '/docs/api/shopify-app-remix/app-proxy-components/appproxy-link', + url: '/docs/api/shopify-app-remix/app-proxy-components/appproxylink', type: 'remix', }, ], From 6febc1d419ce2a4786bc4e3c4f701428fe32d3a6 Mon Sep 17 00:00:00 2001 From: Elizabeth Kenyon Date: Wed, 4 Dec 2024 16:41:45 -0600 Subject: [PATCH 2/2] regenerate docs --- .../docs/generated/generated_docs_data.json | 113 +----------------- 1 file changed, 3 insertions(+), 110 deletions(-) diff --git a/packages/apps/shopify-app-remix/docs/generated/generated_docs_data.json b/packages/apps/shopify-app-remix/docs/generated/generated_docs_data.json index fd15e751b1..5480bb49ae 100644 --- a/packages/apps/shopify-app-remix/docs/generated/generated_docs_data.json +++ b/packages/apps/shopify-app-remix/docs/generated/generated_docs_data.json @@ -317,48 +317,6 @@ "value": "EmbeddedTypedAdminContext & ScopesContext", "description": "" }, - "FeatureEnabled": { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "FeatureEnabled", - "value": "Future extends FutureFlags\n ? Future[Flag] extends true\n ? true\n : false\n : false", - "description": "" - }, - "FutureFlags": { - "filePath": "src/server/future/flags.ts", - "name": "FutureFlags", - "description": "", - "members": [ - { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "PropertySignature", - "name": "removeRest", - "value": "boolean", - "description": "When enabled, methods for interacting with the admin REST API will not be returned.\n\nThis affects:\n\n* `authenticate.admin(request)` * `authenticate.webhook(request)` * `authenticate.flow(request)` * `authenticate.appProxy(request)` * `authenticate.fulfillmentService(request)` * `unauthenticated.admin(shop)`\n\nIn a future release we will remove REST from the package completely.\n\nPlease see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)", - "isOptional": true, - "defaultValue": "false" - }, - { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "PropertySignature", - "name": "unstable_newEmbeddedAuthStrategy", - "value": "boolean", - "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", - "isOptional": true, - "defaultValue": "false" - }, - { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "PropertySignature", - "name": "wip_optionalScopesApi", - "value": "boolean", - "description": "When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.", - "isOptional": true, - "defaultValue": "false" - } - ], - "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.\n *\n * @default false\n */\n wip_optionalScopesApi?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" - }, "EmbeddedTypedAdminContext": { "filePath": "src/server/authenticate/admin/types.ts", "syntaxKind": "TypeAliasDeclaration", @@ -4062,7 +4020,6 @@ "AdminApiContext": { "filePath": "src/server/clients/admin/types.ts", "syntaxKind": "TypeAliasDeclaration", - "syntaxKind": "TypeAliasDeclaration", "name": "AdminApiContext", "value": "FeatureEnabled extends true\n ? AdminApiContextWithoutRest\n : AdminApiContextWithRest", "description": "" @@ -4096,18 +4053,9 @@ "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", "isOptional": true, "defaultValue": "false" - }, - { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "PropertySignature", - "name": "wip_optionalScopesApi", - "value": "boolean", - "description": "When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.", - "isOptional": true, - "defaultValue": "false" } ], - "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.\n *\n * @default false\n */\n wip_optionalScopesApi?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" + "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" }, "AdminApiContextWithoutRest": { "filePath": "src/server/clients/admin/types.ts", @@ -4152,9 +4100,6 @@ ] } ], - "value": "export interface AdminApiContextWithoutRest {\n /**\n * Methods for interacting with the Shopify Admin GraphQL API\n *\n * {@link https://shopify.dev/docs/api/admin-graphql}\n * {@link https://github.com/Shopify/shopify-app-js/blob/main/packages/apps/shopify-api/docs/reference/clients/Graphql.md}\n *\n * @example\n * Querying the GraphQL API.\n * Use `admin.graphql` to make query / mutation requests.\n * ```ts\n * // /app/routes/**\\/*.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { admin } = await authenticate.admin(request);\n *\n * const response = await admin.graphql(\n * `#graphql\n * mutation populateProduct($input: ProductInput!) {\n * productCreate(input: $input) {\n * product {\n * id\n * }\n * }\n * }`,\n * {\n * variables: {\n * input: { title: \"Product Name\" },\n * },\n * },\n * );\n *\n * const productData = await response.json();\n * return json({\n * productId: productData.data?.productCreate?.product?.id,\n * });\n * }\n * ```\n *\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n *\n * @example\n * Handling GraphQL errors.\n * Catch `GraphqlQueryError` errors to see error messages from the API.\n * ```ts\n * // /app/routes/**\\/*.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { admin } = await authenticate.admin(request);\n *\n * try {\n * const response = await admin.graphql(\n * `#graphql\n * query incorrectQuery {\n * products(first: 10) {\n * nodes {\n * not_a_field\n * }\n * }\n * }`,\n * );\n *\n * return json({ data: await response.json() });\n * } catch (error) {\n * if (error instanceof GraphqlQueryError) {\n * // error.body.errors:\n * // { graphQLErrors: [\n * // { message: \"Field 'not_a_field' doesn't exist on type 'Product'\" }\n * // ] }\n * return json({ errors: error.body?.errors }, { status: 500 });\n * }\n * return json({ message: \"An error occurred\" }, { status: 500 });\n * }\n * }\n * ```\n *\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n */\n graphql: GraphQLClient;\n}" - } - ], "value": "export interface AdminApiContextWithoutRest {\n /**\n * Methods for interacting with the Shopify Admin GraphQL API\n *\n * {@link https://shopify.dev/docs/api/admin-graphql}\n * {@link https://github.com/Shopify/shopify-app-js/blob/main/packages/apps/shopify-api/docs/reference/clients/Graphql.md}\n *\n * @example\n * Querying the GraphQL API.\n * Use `admin.graphql` to make query / mutation requests.\n * ```ts\n * // /app/routes/**\\/*.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { admin } = await authenticate.admin(request);\n *\n * const response = await admin.graphql(\n * `#graphql\n * mutation populateProduct($input: ProductInput!) {\n * productCreate(input: $input) {\n * product {\n * id\n * }\n * }\n * }`,\n * {\n * variables: {\n * input: { title: \"Product Name\" },\n * },\n * },\n * );\n *\n * const productData = await response.json();\n * return json({\n * productId: productData.data?.productCreate?.product?.id,\n * });\n * }\n * ```\n *\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n *\n * @example\n * Handling GraphQL errors.\n * Catch `GraphqlQueryError` errors to see error messages from the API.\n * ```ts\n * // /app/routes/**\\/*.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { admin } = await authenticate.admin(request);\n *\n * try {\n * const response = await admin.graphql(\n * `#graphql\n * query incorrectQuery {\n * products(first: 10) {\n * nodes {\n * not_a_field\n * }\n * }\n * }`,\n * );\n *\n * return json({ data: await response.json() });\n * } catch (error) {\n * if (error instanceof GraphqlQueryError) {\n * // error.body.errors:\n * // { graphQLErrors: [\n * // { message: \"Field 'not_a_field' doesn't exist on type 'Product'\" }\n * // ] }\n * return json({ errors: error.body?.errors }, { status: 500 });\n * }\n * return json({ message: \"An error occurred\" }, { status: 500 });\n * }\n * }\n * ```\n *\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n */\n graphql: GraphQLClient;\n}" }, "GraphQLClient": { @@ -4949,48 +4894,6 @@ "value": "EmbeddedTypedAdminContext & ScopesContext", "description": "" }, - "FeatureEnabled": { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "FeatureEnabled", - "value": "Future extends FutureFlags\n ? Future[Flag] extends true\n ? true\n : false\n : false", - "description": "" - }, - "FutureFlags": { - "filePath": "src/server/future/flags.ts", - "name": "FutureFlags", - "description": "", - "members": [ - { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "PropertySignature", - "name": "removeRest", - "value": "boolean", - "description": "When enabled, methods for interacting with the admin REST API will not be returned.\n\nThis affects:\n\n* `authenticate.admin(request)` * `authenticate.webhook(request)` * `authenticate.flow(request)` * `authenticate.appProxy(request)` * `authenticate.fulfillmentService(request)` * `unauthenticated.admin(shop)`\n\nIn a future release we will remove REST from the package completely.\n\nPlease see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)", - "isOptional": true, - "defaultValue": "false" - }, - { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "PropertySignature", - "name": "unstable_newEmbeddedAuthStrategy", - "value": "boolean", - "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", - "isOptional": true, - "defaultValue": "false" - }, - { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "PropertySignature", - "name": "wip_optionalScopesApi", - "value": "boolean", - "description": "When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.", - "isOptional": true, - "defaultValue": "false" - } - ], - "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.\n *\n * @default false\n */\n wip_optionalScopesApi?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" - }, "EmbeddedTypedAdminContext": { "filePath": "src/server/authenticate/admin/types.ts", "syntaxKind": "TypeAliasDeclaration", @@ -8779,23 +8682,13 @@ { "filePath": "src/server/future/flags.ts", "syntaxKind": "PropertySignature", - "name": "removeRest", - "value": "boolean", - "description": "When enabled, methods for interacting with the admin REST API will not be returned.\n\nThis affects:\n\n* `authenticate.admin(request)` * `authenticate.webhook(request)` * `authenticate.flow(request)` * `authenticate.appProxy(request)` * `authenticate.fulfillmentService(request)` * `unauthenticated.admin(shop)`\n\nIn a future release we will remove REST from the package completely.\n\nPlease see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)", - "isOptional": true, - "defaultValue": "false" - }, - { - "filePath": "src/server/future/flags.ts", - "syntaxKind": "PropertySignature", - "name": "wip_optionalScopesApi", + "name": "unstable_newEmbeddedAuthStrategy", "value": "boolean", - "description": "When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.", + "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", "isOptional": true, "defaultValue": "false" } ], - "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, the Scopes API will be available. This feature is in development and requires special permissions from Shopify for now.\n *\n * @default false\n */\n wip_optionalScopesApi?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" "value": "export interface FutureFlags {\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n\n /**\n * When enabled, methods for interacting with the admin REST API will not be returned.\n *\n * This affects:\n *\n * * `authenticate.admin(request)`\n * * `authenticate.webhook(request)`\n * * `authenticate.flow(request)`\n * * `authenticate.appProxy(request)`\n * * `authenticate.fulfillmentService(request)`\n * * `unauthenticated.admin(shop)`\n *\n * In a future release we will remove REST from the package completely.\n *\n * Please see: [https://www.shopify.com/ca/partners/blog/all-in-on-graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql)\n *\n * @default false\n */\n removeRest?: boolean;\n}" } }