Open mrctrifork opened 8 months ago
0.8.17
Darwin 23.3.0 arm64 arm
If you follow the pattern:
const types = /* GraphQL */` ...the types ` as const const resolvers = {...} satisfies Resolver<CreateMobius<typeof types, AppScalars>, AppContext>
You'll see the following error message:
Object literal may only specify known properties, and 'subscribe' does not exist in type '(parent: unknown, args: { from: number; }, context: { request: Request; headers: Map<string, string>; user: undefined; }, info: unknown) => MaybePromise<number>'.ts(2353) index.d.ts(177, 15): The expected type comes from property 'countdown' which is declared here on type '{ countdown: (parent: unknown, args: { from: number; }, context: { request: Request; headers: Map<string, string>; user: undefined; }, info: unknown) => MaybePromise<number>; }' (property) subscribe: (_: any, { from }: { from: any; }) => AsyncGenerator<{ countdown: any; }, void, unknown>
If we ignore the error it works fine. It's just the compiler
TypeScript shouldn't raise an error.
TypeScript error
I believe the underlying problem has to be solved by patching mobius
any idea how enable subscription (graphql-ws) using yoga ?
What version of Elysia.JS is running?
0.8.17
What platform is your computer?
Darwin 23.3.0 arm64 arm
What steps can reproduce the bug?
If you follow the pattern:
You'll see the following error message:
If we ignore the error it works fine. It's just the compiler
What is the expected behavior?
TypeScript shouldn't raise an error.
What do you see instead?
TypeScript error
Additional information
I believe the underlying problem has to be solved by patching mobius