Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: stop using undocumented __resolveObject AS feature
Apollo Server 2.2.1 introduced an experimental feature named __resolveObject. It was like an extra-powerful version of __resolveReference (which did not yet exist) which also allowed you to return references within a single subgraph and they'd be magically converted into full objects. It was never documented and was described multiple times as experimental. Its implementation is entirely inside the Apollo Server schema instrumentation, which is largely designed for enabling willResolveField plugins (eg, usage reporting). In fact, as the developer of the main feature in AS 3.6.0 (apollographql/apollo-server#5963) I added an optimization to not call schema instrumentation at all if there are no willResolveField plugin hooks... which means that this feature is broken in that case! We are likely to remove this feature in AS4. To get ready for that, stop using it in tests here. This involves changing the existing ones to `__resolveReference` and also adding some direct "object resolution" to resolvers that return objects within the "owning" service. This is an improvement anyway, so that our fixtures use the documented `__resolveReference` feature instead of a different obscure feature.
- Loading branch information