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

[Feature] Add signal option to allow aborting requests #1972

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

lizkenyon
Copy link
Contributor

WHY are these changes introduced?

Fixes Http request error, no response available: GraphQL Client: fetch failed

WHAT is this pull request doing?

  • This PR adds an option to pass an AbortSignal to requests

  • This will allow developers to set their own timeouts for individual requests, this will allow developers more flexibility to handle fetch errors

  • The base functionality was already added to the GraphQL client in this PR, this just adds the functionality to pass this option through.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have used pnpm changeset to create a draft changelog entry (do NOT update the CHANGELOG.md files manually)
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@lizkenyon lizkenyon requested a review from a team as a code owner January 15, 2025 22:38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this might an accident commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♀️ should be fixed

This allows developers to abort requests if responses are not recieved in sufficient time

Can be used to set a custom timeout per request

If the request is aborted an error will be thrown

update docs
@lizkenyon lizkenyon force-pushed the liz/add-abort-signal branch from 55f5619 to 89d803e Compare January 16, 2025 22:43
@lizkenyon lizkenyon requested a review from sle-c January 20, 2025 15:28
@lizkenyon lizkenyon merged commit 7e679cd into main Jan 22, 2025
6 checks passed
@lizkenyon lizkenyon deleted the liz/add-abort-signal branch January 22, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Http request error, no response available: GraphQL Client: fetch failed
2 participants