Použití mercurius, fastify s typegraphql udělat chybu

0

Otázka

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:

enter image description here

Když jsem odstranit, chyba zmizí

enter image description here

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'.

fastify graphql node.js typegraphql
2021-11-23 14:14:15
1

Nejlepší odpověď

0

Musel jsem downgrade graphql balíčky z verze 6 na 4, protože mercurius nepodporuje graphql 6 až teď.

2021-11-23 20:32:25

V jiných jazycích

Tato stránka je v jiných jazycích

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................