I just upgrade graphql_flutter version "3.1.0" to "5.0.0-nullsafety.5".
IDE has an exception: "The method 'OptimisticCache' isn't defined for the type 'GraphQLService'."
My code:
ValueNotifier(
GraphQLClient(
cache: OptimisticCache(dataIdFromObject: typenameDataIdFromObject),
link: link,
defaultPolicies: DefaultPolicies(
watchQuery: Policies(
fetch: FetchPolicy.noCache,
),
query: Policies(
fetch: FetchPolicy.noCache,
),
mutate: Policies(
fetch: FetchPolicy.noCache,
),
),
),
)
How to fix it?