-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send dev harness event from react hook when it is a stubbed action #638
Conversation
useAction({ | ||
// @ts-expect-error intentionally passing the wrong type | ||
type: "stubbedAction", | ||
reason: "MissingApiTrigger", | ||
dataPath: "fakePath", | ||
functionName: "fakeFunction", | ||
modelApiIdentifier: "fakeModel", | ||
variables: {}, | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some parameters are unavailable today, so I need to make a fake object to trigger an event. I'll update the tests once we have shipped the change to the Gadget side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bf8f5bb
to
c6df1c4
Compare
c6df1c4
to
78c3ce2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 🍏 Properly pops the dev harness for no-trigger modelActions, bulkModelActions, and global actions
This PR sends a dev harness event when the action is a stubbed action (i.e. no API trigger)
Gadget side to consume this new event type: https://github.com/gadget-inc/gadget/pull/12894
PR Checklist