trpc

🧙‍♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.

MIT License

Downloads
7.4M
Stars
32.7K
Committers
405

Bot releases are visible (Hide)

trpc -

Published by KATT almost 3 years ago

  • @trpc/react: add ssrContext to TRPCProvider (#1304)
  • @trpc/react: alias useMutation([path]) with useMutation(path) (#1275)
trpc -

Published by KATT almost 3 years ago

  • @trpc/react: add helpers for refetchQueries & InvalidateQueryFilters (#1245)
trpc -

Published by KATT almost 3 years ago

  • Improves IntelliSense performance by simplifying the app router (#1218)
  • Adds new experimental .flat()-method that can be optionally called at the end of an app router (#1218)

Thanks to @mgreenw and @darioielardi for helping with testing & giving feedback!

trpc -

Published by KATT almost 3 years ago

  • Bump react-query to 3.31.0 and also bumped the peer dependency since this was merged (#1197)
trpc - v9.12.1

Published by KATT almost 3 years ago

  • Updates so all internal @trpc/* dependencies to peerDependencies instead of dependencies. Hopefully, this makes dependabot being able for auto-updates to update in a batch and leads to not having mismatching versions installed at the same time. (#1199)
trpc -

Published by KATT almost 3 years ago

  • Add PRECONDITION_FAILED / HTTP 412 error code (#1194)
  • Input schemas defined with zod using the inferred input type (#1189 / #1182)

What #1189 means is that you can now do this code:

trpc.router()
  .query('greeting', {
    input: z.object({
      hi: z.string().transform(s => s.length),
    }),
    resolve({ input }) {
      input.hi // => `number`, as expected
    },
  });

// [...] somewhere else:

client.query('greeting', { hi: 'my greeting' });

Thanks to @mgreenw & @kimroen!

trpc -

Published by KATT almost 3 years ago

  • Allow async input validators + support zod's parseAsync (#1173)
  • Expose the extra args from react-query on setQueryData & invalidateQueries (#1186)
trpc -

Published by KATT almost 3 years ago

@trpc/next: get rid of peer dependency warning when upgrading to Next.js 12 (#1174)

trpc -

Published by KATT about 3 years ago

  • Pins packages @trpc/*-packages to each other so dependabot et al should know to update all 3 when one is updated. (#1021)
  • Add missing return type on createClient (#1151)

Thank you @mkreuzmayr for your first contribution! 🎉

trpc -

Published by KATT about 3 years ago

  • export all interfaces from createReactQueryHooks (#1121)

thanks @keenahn!

trpc -

Published by KATT about 3 years ago

  • Fix issue leading to Type instantiation is excessively deep and possibly infinite on big routers (#1079)
    • Previously this cap was hit at around ~40 procedures, now confirmed and tested for >500 procedures
    • Also autocompletion / inference on big routers should have gotten a perf improvement

Thanks to @mgreenw for reporting this!

trpc -

Published by KATT about 3 years ago

  • Add support for superstruct validation (#1056)
  • Make useInfiniteQuery() only callable for appropriate procedures (#1065)
  • Pass procedure rawInput to middlewares (#1059)

Thanks to @mgreenw, @mmkal, @ifiokjr, @TheoBr!

trpc -

Published by KATT about 3 years ago

Republished as 9.8.0 as #1012 is a minor and not a patch if following semver strictly

trpc -

Published by KATT about 3 years ago

  • Allow passing no input on mutations with no input - mutation.mutate(null) -> mutation.mutate() (#1012)
  • Fix typo in browser environment assertion (#1007)
  • Simplify procedure types/overloads (#956)

thanks to @infix, @mmkal, & @zebapy!

trpc -

Published by KATT about 3 years ago

  • Expose getFetch which was previously internal (#923)

thanks @mmkal!

trpc -

Published by KATT about 3 years ago

  • fix inferProcedureInput edge case (#955)
trpc -

Published by KATT about 3 years ago

Very impressive work by @mmkal - thanks a lot!

trpc -

Published by KATT about 3 years ago

  • @trpc/client Add support for async client headers (#909)

thank you @alaister!

trpc -

Published by KATT about 3 years ago

  • add declarationMap which makes it possible to cmd+click on you import in VSCode and jump straight to the source code (#877)
trpc -

Published by KATT about 3 years ago

  • Refactor HTTP internals to enable native support for AWS handler / SvelteKit (#880)
    • Expose lower-level function resolveHTTPResponse() to be used in place of requestHandler() when doing adapters
    • Rename requestRequestHandler to nodeHTTPRequestHandler and move to adapters/node-http *
    • Make naming consistent of HTTP rather than Http everywhere *
    • Move standalone http server to adapters/standalone *
    • Move websocket from @trpc/ws to @trpc/adapters/ws *

*) with backward compatibility and deprecation warnings