Releases: FormidableLabs/next-urql
v0.3.0
This release adds support for different urql
Client configurations between the client-side and the server-side when using next-urql
.
Warning: To support this, access to Next's context object, ctx
, can only happen on the server.
Added
- An example showing how to use a custom exchange with
next-urql
. PR by @ryan-gilb here. - Instructions for using
next-urql
with ReasonML. PR by @parkerziegler here.
Fixed
clientOptions
are no longer serialized inside ofwithUrql
'sgetInitialProps
method. This ensures that users can use different Client configurations between the client and server. PR by @parkerziegler here.- Proper support for forwarding
pageProps
when usingwithUrqlClient
with an_app.js
component. Theurql
Client instance is also attached toctx
for_app.js
getInitialProps
. PR by @parkerziegler here. react-ssr-prepass
dependency upgraded to1.1.2
to supporturql
>= 1.9.0
. PR by @JoviDeCroock here.
Diff
v0.2.5
This release encompasses small changes to our TypeScript definitions for next-urql
, with an upgrade to using next@9
as the basis for new type definitions in lieu of @types/next
. The examples were also converted over to TypeScript from JavaScript.
Added
- All example projects now use TypeScript 🎉 PRs by @ryan-gilb here and here. This gives us stronger guarantees around library types.
Fixed
- Upgraded type definitions to use types from
next@9
. PR by @ryan-gilb here. If accessing theNextContextWithAppTree
interface
, the name has changed toNextUrqlContext
.
Diff
Add urqlClient to Next context object.
This release adds support for accessing the urqlClient
instance off of Next's context object.
Added
urqlClient
is now added to Next's context object,ctx
, such that it can be accessed by other components lower in the tree. PR by @BjoernRave here.
Diff
Fix Support for _app.js.
This release fixes support for using withUrqlClient
with _app.js
.
Added
- Examples are now separated into an
examples
directory. The first,1-with-urql-client
, shows recommended usage by wrapping a Page component, while the second,2-with-_app.js
shows how to set upnext-urql
with_app.js
.
Fixed
- Be sure to check for
urqlClient
in both direct props andpageProps
to handle_app.js
usage withwithUrqlClient
. PR by @bmathews and @parkerziegler here.
Diff
v0.2.2
This release fixes a small discrepancy in the types used by withUrqlClient
and the public API defined by our index.d.ts
file.
Fixed
- Use
NextUrqlClientConfig
in lieu ofNextUrqlClientOptions
inindex.d.ts
to match implementation ofwithUrqlClient
. PR by @kylealwyn here.
Diff
v0.2.1
This release fixes a regression introduced in 0.2.0 involving circular structures created bt withUrqlClient
's getInitialProps
method.
Fixed
- Amend circular structure in
withUrqlClient
caused by returningctx
ingetInitialProps
. PR by @parkerziegler here. - Fix dependency resolution issues in the
example
project. Updateexample
documentation. PR by @parkerziegler here.
Diff
API for Accessing Next Context
This release adds support for accessing Next's context object, ctx
, to instantiate your urql
Client instance.
Added
- Support for accessing Next's context object,
ctx
, when initializingwithUrqlClient
and creating client options. This should assist users who need to access some data stored inctx
to instantiate theirurql
Client instance. PR by @parkerziegler here.
Diff
v0.1.1
This release adds TypeScript definitions to next-urql
, alongside important pieces like a License (MIT), and improved documentation for users and contributors.
Added
- TypeScript definitions for the public API of
next-urql
now ship with the library. PR by @parkerziegler here. - MIT License.
- Improved README documentation around
withUrqlClient
usage. - CONTRIBUTING.md to help new contributors to the project get involved.
Diff
v0.1.0
This is the initial release of next-urql
in its Beta API. The package is not meant to be consumed yet, and this purely serves as a prerelease for local testing.