Skip to content
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

Refresh webhooks in manage app view every 5 seconds #4077

Merged
merged 3 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cyan-planes-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---

Manage App view will now refresh pending/failed webhook deliveries every 5 seconds
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ const DisabledWebhookChip = () => {
);
};

/**
* Refresh webhooks deliveries every 5 seconds
*/
const REFRESH_INTERVAL = 5000;

export const AppWebhooksDisplay = ({
appId,
...boxProps
Expand All @@ -120,6 +125,7 @@ export const AppWebhooksDisplay = ({

const { data: webhooksData, loading } = useAppWebhookDeliveriesQuery({
variables: { appId },
pollInterval: REFRESH_INTERVAL,
});

if (loading) {
Expand Down