Open gajus opened 7 years ago
This is how I am currently using apollo-client v2:
apollo-client
// @flow import { ApolloClient } from 'apollo-client'; import { HttpLink } from 'apollo-link-http'; import InMemoryCache, { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory'; const fragmentMatcher = new IntrospectionFragmentMatcher({ introspectionQueryResultData: { // eslint-disable-next-line id-match __schema: { types: [ { kind: 'INTERFACE', name: 'Paragraph', possibleTypes: [ { name: 'TextParagraph' }, { name: 'ImageParagraph' } ] }, { kind: 'INTERFACE', name: 'Markup', possibleTypes: [ { name: 'DecorationMarkup' }, { name: 'LinkMarkup' } ] } ] } } }); const apolloClient = new ApolloClient({ cache: new InMemoryCache({ fragmentMatcher: fragmentMatcher.match }), link: new HttpLink({ credentials: 'include', uri: '/api' }) }); export default apolloClient;
I have tried migrating to apollo-cache-hermes, but I could not find the equivalent of IntrospectionFragmentMatcher in the code base.
apollo-cache-hermes
IntrospectionFragmentMatcher
Currently there's no analogue for that in hermes - I'm assuming that you're just using it for union support? You can track that functionality via #153
This is how I am currently using
apollo-client
v2:I have tried migrating to
apollo-cache-hermes
, but I could not find the equivalent ofIntrospectionFragmentMatcher
in the code base.