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
test("returns no data, fetching=true, and no error when the mutation is run, and then the successful data if the mutation succeeds",async()=>{
61
+
test("returns no data, fetching=true, and no error when the mutation is run, and then the successful data if the mutation succeeds for an ids only mutation",async()=>{
62
62
const{ result }=renderHook(()=>useBulkAction(bulkExampleApi.widget.bulkFlipDown),{wrapper: MockClientWrapper(bulkExampleApi)});
* React hook to run a Gadget model action. `useAction` must be passed an action function from an instance of your generated API client library, like `api.user.create` or `api.blogPost.publish`. `useAction` doesn't actually run the action when invoked, but instead returns an action function as the second result for running the action in response to an event.
// Adding the model's additional typename ensures document cache will properly refresh, regardless of whether __typename was
123
-
// selected (and sometimes we can't even select it, like delete actions!)
124
-
constresult=awaitrunMutation(newVariables,{
93
+
constresult=awaitrunMutation(variables,{
125
94
...context,
95
+
// Adding the model's additional typename ensures document cache will properly refresh, regardless of whether __typename was selected (and sometimes we can't even select it, like delete actions!)
// Adding the model's additional typename ensures document cache will properly refresh, regardless of whether __typename was
85
-
// selected (and sometimes we can't even select it, like delete actions!)
86
90
constresult=awaitrunMutation(variables,{
87
91
...context,
92
+
// Adding the model's additional typename ensures document cache will properly refresh, regardless of whether __typename was selected (and sometimes we can't even select it, like delete actions!)
0 commit comments