Já se snažím používat typegraphql s mercurius a fastify jsem to kopíroval integrace z mercurius documentaion, když jsem přidat předdefinované schéma mercurius to mi ukázal chybu v tento způsob:
Když jsem odstranit, chyba zmizí
To je chybové hlášení zobrazeno:
Žádné přetížení odpovídá této výzvy. Přetížení 1 3, '(plugin: FastifyPluginCallback<MercuriusOptions, Server>, rozhodne?: FastifyRegisterOptions | undefined): FastifyInstance<...> & PromiseLike<...>', dal následující chyby. Typ 'GraphQLSchema' není přiřadit k typu 'řetězec | string[] | GraphQLSchema | undefined'. Typ 'GraphQLSchema' chybí následující vlastnosti z typu 'GraphQLSchema': popis, getImplementations, isSubType Přetížení 2 3 '(plugin: FastifyPluginAsync<MercuriusOptions, Server>, rozhodne?: FastifyRegisterOptions | undefined): FastifyInstance<...> & PromiseLike<...>', dal následující chyby. Argument typu 'typeof mercurius' je nepřevoditelná na parametr typu 'FastifyPluginAsync<MercuriusOptions, Server>'. Typ "void" není přiřadit k typu "Slibovat". Přetížení 3 3, '(plugin: FastifyPluginCallback<MercuriusOptions, Server> | FastifyPluginAsync<MercuriusOptions, Server> | Slib,<...> | Slib,<...>, rozhodne?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', dal následující chyby. Typ 'GraphQLSchema' není přiřadit k typu 'řetězec | string[] | GraphQLSchema | undefined'.