Skip to content

Commit 69b56fd

Browse files
authored
chore: remove exception to storefront client api url (#3443)
1 parent 178e0c8 commit 69b56fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/hydrogen-react/src/storefront-client.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ describe(`createStorefrontClient`, () => {
121121
generateConfig({storeDomain: 'mock.shop'}),
122122
);
123123

124-
expect(client.getStorefrontApiUrl()).toBe(`https://mock.shop/api`);
124+
expect(client.getStorefrontApiUrl()).toBe(
125+
`https://mock.shop/api/${SFAPI_VERSION}/graphql.json`,
126+
);
125127
});
126128
});
127129

packages/hydrogen-react/src/storefront-client.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ export function createStorefrontClient({
8989
const domain = getShopifyDomain(overrideProps);
9090
const apiUrl = domain + (domain.endsWith('/') ? 'api' : '/api');
9191

92-
if (isMockShop(domain)) return apiUrl;
93-
9492
return `${apiUrl}/${
9593
overrideProps?.storefrontApiVersion ?? storefrontApiVersion
9694
}/graphql.json`;

0 commit comments

Comments
 (0)