.westsaid
.westsaid
TtRPC
Created by .westsaid on 10/12/2022 in #❓-help
How to use trpc react hooks from an external data source
Hi, glad it was super helpful for you 😊 Unfortunatly no, didnt touch subscriptions yet
8 replies
TtRPC
Created by .westsaid on 10/12/2022 in #❓-help
How to use trpc react hooks from an external data source
Hey, I've uploaded a working nextjs-trpc-keystone example: https://github.com/Westsaid/nextjs-trpc-keystone-example
8 replies
TtRPC
Created by .westsaid on 10/11/2022 in #❓-help
NextJS & Keystone CMS, issues when connecting both in a monorepo
Im setting up a boiled down version of this repo to debug and maybe feature later on rn!
13 replies
TtRPC
Created by .westsaid on 10/11/2022 in #❓-help
NextJS & Keystone CMS, issues when connecting both in a monorepo
If you or someone else want to start a debugging session sometimes hit me up. We could also set up an example project with "tRPC X Keystone JS CMS" which could be featured on the tRPC website
13 replies
TtRPC
Created by .westsaid on 10/12/2022 in #❓-help
How to use trpc react hooks from an external data source
Hi, yes kind of, as the discussion on my other issue states: I have a type error which I cannot fix in a reproductive way. It seems to me that its just a type error as I receive data using the cmsTrpc variable as if there was no error. Although this of course stops me from building...
8 replies
TtRPC
Created by .westsaid on 10/11/2022 in #❓-help
NextJS & Keystone CMS, issues when connecting both in a monorepo
Type 'CreateRouterInner<RootConfig<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<TypeInfo>; }; meta: {}; errorShape: { data: { code: "PARSE_ERROR" | "BAD_REQUEST" | ... 10 more ... | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string | undefined; stack?: string | undefined; }; message: s...' does not satisfy the constraint 'Router<any>'.
Type 'Router<RouterDef<RootConfig<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<TypeInfo>; }; meta: {}; errorShape: { data: { code: "PARSE_ERROR" | ... 11 more ... | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string | undefined; stack?: string | undefined; }; message: string; code: TRPC...' is missing the following properties from type 'Router<any>': errorFormatter, transformerts(2344)
Type 'CreateRouterInner<RootConfig<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<TypeInfo>; }; meta: {}; errorShape: { data: { code: "PARSE_ERROR" | "BAD_REQUEST" | ... 10 more ... | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string | undefined; stack?: string | undefined; }; message: s...' does not satisfy the constraint 'Router<any>'.
Type 'Router<RouterDef<RootConfig<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<TypeInfo>; }; meta: {}; errorShape: { data: { code: "PARSE_ERROR" | ... 11 more ... | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string | undefined; stack?: string | undefined; }; message: string; code: TRPC...' is missing the following properties from type 'Router<any>': errorFormatter, transformerts(2344)
13 replies
TtRPC
Created by .westsaid on 10/11/2022 in #❓-help
NextJS & Keystone CMS, issues when connecting both in a monorepo
Okay, I have to rollback, installed my repo on a new Pc, same issue again :/
13 replies
TtRPC
Created by .westsaid on 10/11/2022 in #❓-help
NextJS & Keystone CMS, issues when connecting both in a monorepo
Yes, turborepo. I reinstalled using yarn, then it worked
13 replies
TtRPC
Created by .westsaid on 10/11/2022 in #❓-help
NextJS & Keystone CMS, issues when connecting both in a monorepo
Hi, I deleted node_modules, rechecked my monorepo configuration and reinstalled. The error disappeared. @Matheus Mazeto
13 replies
TtRPC
Created by .westsaid on 10/11/2022 in #❓-help
NextJS & Keystone CMS, issues when connecting both in a monorepo
This can be considered closed. There was a problem with the config of the monorepo and the installed packages
13 replies
TtRPC
Created by .westsaid on 10/11/2022 in #❓-help
NextJS & Keystone CMS, issues when connecting both in a monorepo
Full Error Message
Type 'CreateRouterInner<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<TypeInfo>; }; meta: {}; errorShape: { data: { code: "PARSE_ERROR" | ... 11 more ... | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string | undefined; stack?: string | undefined; }; message: string; code: TRPC_ERROR_COD...' does not satisfy the constraint 'Router<any>'.
The types returned by 'createCaller(...)' are incompatible between these types.
Type '{ query: inferHandlerFn<{}>; mutation: inferHandlerFn<{}>; subscription: inferHandlerFn<{}>; } & DecoratedProcedureRecord<{ translations: CreateRouterInner<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<...>; }; meta: {}; errorShape: { ...; }; transformer: CombinedDataTransformer; }, { ...;...' is not assignable to type '{ query: inferHandlerFn<any>; mutation: inferHandlerFn<any>; subscription: inferHandlerFn<any>; } & DecoratedProcedureRecord<any>'.
Type '{ query: inferHandlerFn<{}>; mutation: inferHandlerFn<{}>; subscription: inferHandlerFn<{}>; } & DecoratedProcedureRecord<{ translations: CreateRouterInner<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<...>; }; meta: {}; errorShape: { ...; }; transformer: CombinedDataTransformer; }, { ...;...' is not assignable to type '{ query: inferHandlerFn<any>; mutation: inferHandlerFn<any>; subscription: inferHandlerFn<any>; }'.
Types of property 'query' are incompatible.
Type 'inferHandlerFn<{}>' is not assignable to type 'inferHandlerFn<any>'.
Types of parameters 'path' and 'path' are incompatible.
Type 'TPath' is not assignable to type 'never'.
Type 'string' is not assignable to type 'never'.
Type 'CreateRouterInner<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<TypeInfo>; }; meta: {}; errorShape: { data: { code: "PARSE_ERROR" | ... 11 more ... | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string | undefined; stack?: string | undefined; }; message: string; code: TRPC_ERROR_COD...' does not satisfy the constraint 'Router<any>'.
The types returned by 'createCaller(...)' are incompatible between these types.
Type '{ query: inferHandlerFn<{}>; mutation: inferHandlerFn<{}>; subscription: inferHandlerFn<{}>; } & DecoratedProcedureRecord<{ translations: CreateRouterInner<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<...>; }; meta: {}; errorShape: { ...; }; transformer: CombinedDataTransformer; }, { ...;...' is not assignable to type '{ query: inferHandlerFn<any>; mutation: inferHandlerFn<any>; subscription: inferHandlerFn<any>; } & DecoratedProcedureRecord<any>'.
Type '{ query: inferHandlerFn<{}>; mutation: inferHandlerFn<{}>; subscription: inferHandlerFn<{}>; } & DecoratedProcedureRecord<{ translations: CreateRouterInner<{ ctx: { opts: CreateExpressContextOptions; keystoneCtx: KeystoneContext<...>; }; meta: {}; errorShape: { ...; }; transformer: CombinedDataTransformer; }, { ...;...' is not assignable to type '{ query: inferHandlerFn<any>; mutation: inferHandlerFn<any>; subscription: inferHandlerFn<any>; }'.
Types of property 'query' are incompatible.
Type 'inferHandlerFn<{}>' is not assignable to type 'inferHandlerFn<any>'.
Types of parameters 'path' and 'path' are incompatible.
Type 'TPath' is not assignable to type 'never'.
Type 'string' is not assignable to type 'never'.
13 replies
TtRPC
Created by .westsaid on 9/18/2022 in #❓-help
Problem using next+ssg
oh yes, that seems to solve it! Thank you 😄
5 replies
TtRPC
Created by .westsaid on 9/18/2022 in #❓-help
Problem using next+ssg
No, its set to ssr: true,
5 replies