The "setTypeDefs" method document here is NOT located on InMemoryCache or ApolloClient instances.
Furthermore, I searched the entire install folder for "setTypeDefs" without success. Via google search, I did find it on ApolloClient class def in a pull request diff-view here in "packages/apollo-client/src/ApolloClient.ts". However, in the current version of this file it is not there.
Has it been deprecated, moved, or am I looking completely in the wrong place?
Respectfully,
MP
Want an "addTypeDefs", too. Just like "addResolvers" to deal with code split.
In case someone stumbles upon this. setTypeDefs was removed in commit d3931b8347c76c961ae24da68ef108576e67ff0d on Feb 1, 2019 with the following explanation:
We're going to avoid getters/setters for
typeDefsfor now,
and instead recommendtypeDefsare set via theApolloClient
constructor. We were originally exposing getters/setters for
integrations like Apollo Client Devtools, but we'll adjust
devtools to access thetypeDefsin a different way. We will
likely want to revisit this decision in the future, to
accommodate the possibility that people want to add to their
local schema at different points in their application, but
we'll cross that bridge when we get there. For now keeping the
changes to the publicApolloClientAPI minimal, is the goal.
Most helpful comment
Want an "addTypeDefs", too. Just like "addResolvers" to deal with code split.