diff --git a/.changeset/mighty-bikes-sneeze.md b/.changeset/mighty-bikes-sneeze.md new file mode 100644 index 0000000000..605960b282 --- /dev/null +++ b/.changeset/mighty-bikes-sneeze.md @@ -0,0 +1,6 @@ +--- +"@shopify/shopify-app-remix": patch +--- + +Update AppConfig type to Readonly. The config should not be modified after it is created. + diff --git a/packages/shopify-app-remix/src/server/shopify-app.ts b/packages/shopify-app-remix/src/server/shopify-app.ts index 1bdd877c74..6e1d681055 100644 --- a/packages/shopify-app-remix/src/server/shopify-app.ts +++ b/packages/shopify-app-remix/src/server/shopify-app.ts @@ -61,7 +61,7 @@ export function shopifyApp< Resources extends ShopifyRestResources, Storage extends SessionStorage, Future extends FutureFlagOptions = Config['future'], ->(appConfig: Config): ShopifyApp { +>(appConfig: Readonly): ShopifyApp { const api = deriveApi(appConfig); const config = deriveConfig(appConfig, api.config); const logger = overrideLogger(api.logger);