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

hotfix: graphql connection error handler #4523

Merged
Prev Previous commit
fix: toggle connection state if schema fetch attempt fails
  • Loading branch information
jamesgeorge007 committed Nov 12, 2024
commit c2e5e7f7f172db2f0eaa86e251f6ae2292c94c0b
2 changes: 2 additions & 0 deletions packages/hoppscotch-common/src/helpers/graphql/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ export const connect = async (
poll()
}, GQL_SCHEMA_POLL_INTERVAL)
} catch (error) {
connection.state = "ERROR"

// Show an error toast if the introspection attempt failed and not while sending a request
if (!isRunGQLOperation) {
toast.error(t("graphql.connection_error_http"))
Expand Down