Why use IntrospectionFragmentMatcher?

2020-05-27 04:58发布

Is there any reason to use IntrospectionFragmentMatcher to determine concrete types of values returned from interface and union fields?

I'm talking about apollo-client. I'm using InMemoryCache with addTypename: true, so the type is known the moment the client gets the response.

Meanwhile my console is plagued with warnings like these: console warnings

The only reason I see the documentation hint at is response validation. But why validate the server-sent response at all? If the server is not worth trusting, validation is useless anyway.

标签: apollo
2条回答
SAY GOODBYE
2楼-- · 2020-05-27 05:40
老娘就宠你
3楼-- · 2020-05-27 05:46

If you're using useQuery then try fetchPolicy: 'no-cache'.

this solved my issue.

查看更多
登录 后发表回答