Releases: urql-graphql/urql
v1.3.0
This release comes with some important fixes and enhancements, which all address
certain edge-cases when using urql.
It fixes the cache-and-network request policy, which wouldn't always work correctly and issue another network request after resolving a response from the default cache. We also had a major bug in React Native environments where responses wouldn't ever be reflected in the useQuery hook's state. Lastly, you can now use extensions from your GraphQL servers and modify the OperationContext from the hooks options.
- ✨ Add support for
extensionskey in GraphQL responses, by @adamscybot (see #355) - ⚠ Fix
cache-and-networkrequest policy by adding operation flushing to the client (see #356) - Add
fetchoption to the Client so it doesn't have to be polyfilled globally (see #357 and #359) - ⚠ Fix
useImmediateStatefor React Native environments (see #358) - ✨ Add
contextoption to all hooks to allowOperationContextto be changed dynamically (see #351) - Add
isClientoption tossrExchangein casesuspenseis activated on the client-side (see #369)
v1.2.0
A release focused on improving developer experience (in preparation for the
upcoming devtools) as well as minor documentation improvements and bug fixes.
- Add metadata to operation context in development (see #305, #324, #325 and #329)
- Fix minor typename memory leak (see #321)
- Fix types for react subscription components (see #328)
- Fix displayName attributes not populated in examples (see #330)
- Fix error in
collectTypesmethod (see #343) - Fix HTTP status bounds check error (see #348)
v1.1.3
v1.1.2
This patch fixes a small bug that usually manifests in development,
where the initial state would be incorrect after a fast response from
the GraphQL API. This used to lock the state into fetching: true
indefinitely in some cases.
v1.1.1
This release comes with two small patches. One being a crticial fix, where cancelled requests would be erroneously deduped, which meant a previously cancelled query would never be fetched.
It also refactors our bundling process to transpile Object.assign to restore IE11 support and reduce the amount of duplicate helper in our bundles.
v1.1.0 – Server-side Rendering Support!
After our recent announcement of urql v1 we've received lots of positive feedback and support, but it became clear that the most requested feature for urql was server-side rendering.
So we went back into the machine room and implemented it, so today we're publishing urql v1.1, just a week after our blog post! Our new implementation of server-side rendering works by adding a single new exchange, the ssrExchange, and using a new suspense-mode on the server-side, which can be used together with react-ssr-prepass to prefetch urql queries. 🎉
Getting started with server-side rendering in urql is easy! We've got an extensive guide on how to set it up, which you can read on our new & fancy docs site, or alternatively as markdown on GitHub.
We've also added a new example to our repository based on Next.js!
Changes
This version now also requires a version of React supporting hooks! (>= 16.8.0)
We unfortunately forgot to correct the peerDependencies entries in our v1.0.0 release.
- ✨ Add server-side rendering support (see #268)
- ✨ Ensure that state changes are applied immediately on mount (see #256)
- Ensure that effects are run immediately on mount (see #250)
⚠️ Removecreate-react-contextand bump React peer dependency (see #252)- Add generics to the
Query,Mutation, andSubscriptioncomponents ⚠️ Fix issues whereuseQuerywouldn't update or teardown correctly (see #243)- ✨ Add support for
pauseprop/option touseQueryandQuery(see #237)
v1.0.5
- Export
MutationPropstypes for TS typings, by @mxstbr (see #236) - Export
Use*Argstypes for TS typings, by @mxstbr (see #235) - Export all hook response types for TS typings, by @good-idea (see #233)
- ⚠ Fix runtime error in
cachExchangewhere already deleted keys where being accessed (see #223) ⚠️ FixcacheExchangenot forwarding teardowns correctly, which lead to unnecessary/outdated queries being executed, by @federicobadini (see #222)- Change
GraphQLRequestto always pass on a parsed GraphQLDocumentNodeinstead of just a string, which reduces work (see #221) - Fix incorrect TS types by using
Omit<T, K>(see #220)
v1.0.4
- Fix
__typenamenot being extracted from responses correctly, which broke caching - Fix
fetchOptionsbeing called in the client instead of thefetchexchange - Improve
CombinedErrorto actually be anErrorand rehydrateGraphQLErrorinstances - Fix
Mutation#executeMutationprop not accepting generics
