You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Unclear why, but this yields twice with the same results, so skip one.
55
-
if(skipFirst){
56
-
skipFirst=false;
57
-
}else{
58
-
forceUpdate();
59
-
}
60
-
},
61
-
(error)=>{
62
-
console.log(error);
63
-
},
64
-
);
65
-
return()=>subscription.unsubscribe();
66
-
},[observableQuery]);
60
+
constresult=useFragment(doc);
61
+
constdata=result.complete ? result.data : {};
62
+
returndataasobject;
63
+
}
67
64
68
-
constresult=observableQuery.getCurrentResult();
69
-
if(result.partial){
70
-
invariant(
71
-
false,
72
-
"useFragment(): Missing data expected to be seeded by the execution query document: %s. Please check your type policies and possibleTypes configuration. If only subset of properties is missing you might need to configure merge functions for non-normalized types.",
73
-
JSON.stringify(
74
-
// we need the cast because queryInfo and lastDiff are private but very useful for debugging
"useFragment(): Expected Apollo to respond with previously seeded data of the execution query document: %s. Did you configure your type policies and possibleTypes correctly? Check apollo-react-relay-duct-tape README for more details.",
"useFragment(): Expected Apollo to respond with previously seeded data of the execution query document. Did you configure your type policies and possibleTypes correctly? Check apollo-react-relay-duct-tape README for more details.",
122
+
fragmentDefinition,
123
+
"useFragment(): Expected a fragment definition to be found in the "+
124
+
"watch query document. Did you forget to invoke the compiler?",
0 commit comments