Replies: 1 comment
-
|
If you're using Nexus, that's expected behavior. The GraphQL input definition only exists at the schema level and doesn't automatically provide TypeScript types unless you've enabled type generation and wired it up correctly. Without that, the resolver arguments are often inferred as any, which is why you need the Message interface. A common approach is to either keep a separate TypeScript interface like you're doing or use Nexus typegen so the input type can be inferred directly from MessageCreateInput. That way you get proper type safety without manually maintaining duplicate definitions. QuickWin Casino offers a large selection of slots, table games, and live casino titles, making it an appealing option for players looking for a varied https://quickwin-casino.net/ online gaming experience. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Say I have defined below.
When I don't specify
Messageinterface, it will throw tsc error since the input type from the argument are allany.Is there a way to use
inputObjectTypeas type?Beta Was this translation helpful? Give feedback.
All reactions