wobsoriano / trpc-nuxt

End-to-end typesafe APIs in Nuxt applications.
trpc-nuxt.vercel.app
MIT License
687 stars 39 forks source link

TRPC release v10.20.0 breaking change on `HTTPLinkOptions` #87

Closed Colonel-Sandvich closed 1 year ago

Colonel-Sandvich commented 1 year ago

In this release the interal types were changed for HTTPLinkOptions In this PR the type HTTPLinkOptions that this package uses got renamed to HTTPLinkBaseOptions but also in the process the headers property got moved to a new type HTTPLinkOptions declared here.

This breaks typing of options in httpLink and httpBatchLink provided by this package.

The fix is simple, just need to change the import from '@trpc/client/dist/links/internals/httpUtils' to '@trpc/client/dist/links/httpLink'.

PR here

fskarmeta commented 1 year ago

Not sure if this is related but i got type error that the url property is not part of httpBatchLink image

maybe im doing something wrong, but i have the impression that this is how the api is used.

@wobsoriano thanks for this module :D

Colonel-Sandvich commented 1 year ago

What versions of @trpc/server, @trpc/client and trpc-nuxt do you have installed?

fskarmeta commented 1 year ago

@trpc/server 10.20.0 @trpc/client 10.20.0 trpc-nuxt 0.8.0

Colonel-Sandvich commented 1 year ago

@fskarmeta upgrade trpc-nuxt to 0.9.0