[英]how to replace "OptimisticCache" in GraphQL flutter?
我只是將graphql_flutter版本“3.1.0”升級到“5.0.0-nullsafety.5”。
IDE 有一個例外:“方法 'OptimisticCache' 沒有為類型 'GraphQLService' 定義。”
我的代碼:
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,
),
),
),
)
如何解決?
final GraphQLCache cache = GraphQLCache(
dataIdFromObject: uuidFromObject,
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.