type-graphql icon indicating copy to clipboard operation
type-graphql copied to clipboard

`addResolversToSchema` example no longer functional after Apollo update

Open dobrynin opened this issue 2 years ago • 2 comments

Describe the issue The Apollo Federation example no longer works as written in this file: https://github.com/MichalLytek/type-graphql/blob/master/examples/apollo-federation/helpers/buildFederatedSchema.ts

Apollo has changed how __resolveReference works and has improved support for Directives in a federated graph. Issues discussed in https://github.com/MichalLytek/type-graphql/pull/369 can likely be dealt with now.

See here for the discussion in the federation repo about this issue: https://github.com/apollographql/federation/pull/1747

Are you able to make a PR that fix this? I currently don't have enough understanding of type-graphql internals to propose a specific code change for this. At a minimum we can update the sample code to use the workaround discussed in the Federation repo (all this involves is changing where addResolversToSchema is imported from).

dobrynin avatar May 05 '22 21:05 dobrynin

This is part of examples, documentation not a core code. It's highly possible that it might be outdated and does not work with the latest version. I will do my best to update it along with the v16 branch.

MichalLytek avatar May 06 '22 06:05 MichalLytek

Thanks @MichalLytek! Appreciate your excellent work on this library.

dobrynin avatar May 06 '22 18:05 dobrynin

Closed by #1331 🔒

MichalLytek avatar Feb 08 '23 15:02 MichalLytek