Skip to content

Commit bec26c3

Browse files
authored
Merge pull request #17 from jopnelli/feature/add-trpc-tanstack-query-support
feat: update trpc to rc.795
2 parents 9360373 + 75ae9e5 commit bec26c3

6 files changed

Lines changed: 61 additions & 35 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ With tRPC we get the same benefits as with GraphQL and more (minus the code gene
4545
* Developer ergonomics: Through the tRCP interface, IDEs will provide code completion for available Forge functions and even support jump-to-source (server) from Custom UI code.
4646

4747
## tRPC v11
48-
Starting version 1.0.0 this packages supports tRPC v11 [which is considered stable](https://trpc.io/docs/migrate-from-v10-to-v11). This package is currently tested with 11.0.0-rc.593. Be aware that you'll need to use React 18.x to use tRPC 11.x with react-query 5.x. If you spot any issues with tRPC 11.x please open an issue.
48+
Starting version 1.0.0 this packages supports tRPC v11 [which is considered stable](https://trpc.io/docs/migrate-from-v10-to-v11). This package is currently tested with 11.0.0-rc.795. Be aware that you'll need to use React 18.x to use tRPC 11.x with react-query 5.x. If you spot any issues with tRPC 11.x please open an issue.

package-lock.json

Lines changed: 51 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"dependencies": {
1212
"@forge/bridge": "^3.3.0",
1313
"@forge/resolver": "^1.5.29",
14-
"@trpc/client": "^11.0.0-rc.593",
15-
"@trpc/server": "^11.0.0-rc.593",
14+
"@trpc/client": "^11.0.0-rc.795",
15+
"@trpc/server": "^11.0.0-rc.795",
1616
"fp-ts": "^2.13.1",
1717
"io-ts": "^2.2.20",
1818
"tslib": "^2.3.0"
@@ -42,7 +42,7 @@
4242
"prettier": "^2.6.2",
4343
"ts-jest": "29.1.2",
4444
"ts-node": "10.9.1",
45-
"typescript": "5.3.3",
45+
"typescript": "5.7.3",
4646
"verdaccio": "^5.0.4"
4747
},
4848
"nx": {

packages/forge-trpc-adapter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies": {
1616
"@forge/resolver": "^1.4.8",
1717
"@toolsplus/forge-trpc-protocol": "0.0.0-development",
18-
"@trpc/server": "^11.0.0-rc.593",
18+
"@trpc/server": "^11.0.0-rc.795",
1919
"fp-ts": "^2.13.1",
2020
"io-ts": "^2.2.20",
2121
"tslib": "^2.3.0"

packages/forge-trpc-adapter/src/lib/resolve-procedure-call.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { pipe } from 'fp-ts/function';
77
import * as PathReporter from 'io-ts/PathReporter';
88
import {
99
AnyRouter,
10-
callProcedure,
10+
callTRPCProcedure,
1111
getErrorShape,
1212
inferRouterContext,
1313
inferRouterError,
@@ -175,8 +175,8 @@ const callProcedures = <TRouter extends AnyRouter>({
175175
pipe(
176176
TE.tryCatch(
177177
() =>
178-
callProcedure({
179-
procedures: router._def.procedures,
178+
callTRPCProcedure({
179+
router,
180180
path,
181181
getRawInput: async () => input,
182182
ctx,

packages/forge-trpc-link/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"dependencies": {
1616
"@forge/bridge": "^3.3.0",
1717
"@toolsplus/forge-trpc-protocol": "0.0.0-development",
18-
"@trpc/client": "^11.0.0-rc.593",
19-
"@trpc/server": "^11.0.0-rc.593",
18+
"@trpc/client": "^11.0.0-rc.795",
19+
"@trpc/server": "^11.0.0-rc.795",
2020
"tslib": "^2.3.0"
2121
}
2222
}

0 commit comments

Comments
 (0)