You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a microservice that uses ApolloServer and there are js based resolvers and gql files. In order to build the schema, we use the buildFederatedSchema method from @apollo/federation. The desire is to migrate to typescript but also avoid reworking the existing js resolvers and typedefs at this point in time. This would allow me to have a mix of js and ts and slowly migrate everything to the typegraphql way of doing things. Is it possible to use the existing typedefs and resolvers when calling buildSchema or do they need to be converted to decorated classes?
example folder structure:
project
│ README.md
└───graphql
│ l───resolvers
│ │ file1.js
│ │ ...
│ l───typedefs
│ │ example.gql
│ │ ...
| index.js // exports a resolvers object and an array of typedef strings
| server.js // uses buildFederatedSchema with the exported resolvers and typedefs and creates an `ApolloServer` instance
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have a microservice that uses ApolloServer and there are js based resolvers and gql files. In order to build the schema, we use the
buildFederatedSchema
method from@apollo/federation
. The desire is to migrate to typescript but also avoid reworking the existing js resolvers and typedefs at this point in time. This would allow me to have a mix of js and ts and slowly migrate everything to the typegraphql way of doing things. Is it possible to use the existing typedefs and resolvers when callingbuildSchema
or do they need to be converted to decorated classes?example folder structure:
Beta Was this translation helpful? Give feedback.
All reactions