[ci] release v1.x-2022-07
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to v1.x-2022-07, this PR will be updated.
Releases
@shopify/[email protected]
Minor Changes
-
Remove automatic origin support from
fetchSyncon the server. (#2276) by @jplhomerDevelopers should never be making
fetchrequests on the server against their own Hydrogen app. This is because some production runtimes prohibit invokingfetchrequests to servers in the same region. Other runtimes will fail to resolve DNS when invoked from within the same process.This change makes it required to pass a fully-qualified URL (including origin) to
fetchSyncwhen it's being used on the server:// MyComponent.server.jsx // ❌ You should not use this pattern, and it will now fail: fetchSync('/api/path').json();Instead, you should query the data directly, or extract the data query to a function and call it inside your server component:
// MyComponent.server.jsx import {sharedQuery} from './shared-location.server'; // ✅ Do this instead: useQuery('shared-query', sharedQuery);This is not considered a breaking change because the intention of the server-side
fetchSyncAPI was never to enable calling a Hydrogen app from itself, but rather to call third-party APIs from the server.