Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ryan953
reviewed
May 7, 2026
| </ul> | ||
| The first argument is a URL pattern from a **generated list of known API endpoints**. This list is derived from the backend route definitions and lives in `knownSentryApiUrls.generated.ts` (with a manual companion for getsentry routes in `knownGetsentryApiUrls.ts`). TypeScript restricts the URL to one of these known patterns, so typos and invalid endpoints are caught at compile time. | ||
|
|
||
| URL patterns use `$param` placeholders (e.g. `$organizationIdOrSlug`, `$issueId`) which TypeScript extracts to enforce a matching `path` object. If the URL has parameters, you must supply all of them - or pass `skipToken` to disable the query. |
Member
There was a problem hiding this comment.
Suggested change
| URL patterns use `$param` placeholders (e.g. `$organizationIdOrSlug`, `$issueId`) which TypeScript extracts to enforce a matching `path` object. If the URL has parameters, you must supply all of them - or pass `skipToken` to disable the query. | |
| URL patterns use `$param` placeholders (e.g. `$organizationIdOrSlug`, `$issueId`) which TypeScript extracts to enforce a matching `path` object. If the URL has parameters, you must supply all of them - [or pass `skipToken`](#conditional-fetching-with-skiptoken) to disable the query. |
ryan953
reviewed
May 7, 2026
Comment on lines
+50
to
+53
| - `staleTime: 0` — data is always stale; it changes often and I'm okay with excess refetches. | ||
| - `staleTime: 30_000` — "I only want to refetch at most every 30 seconds". | ||
| - `staleTime: Infinity` — data never goes stale. Use for data that doesn't change (or changes so rarely that you'll invalidate manually). | ||
| - `staleTime: 'static'` — data is fetched once and _never_ refetched, even if the Query is invalidated manually. |
ryan953
reviewed
May 7, 2026
| Since the return value of `apiOptions` matches the `QueryFilter` that needs to be passed `invalidateQueries`, you can also pass it directly: | ||
|
|
||
| ```tsx | ||
| queryClient.invalidateQueries(sentryAppApiOptions({ appSlug: "my-app" })); |
Member
There was a problem hiding this comment.
tweak to match the example above, call out the differences easier.
Suggested change
| queryClient.invalidateQueries(sentryAppApiOptions({ appSlug: "my-app" })); | |
| const opts = sentryAppApiOptions({ appSlug: "my-app" }); | |
| queryClient.invalidateQueries(opts); |
ryan953
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIBE YOUR PR
This PR updates the Network Request section of the developer docs to reflect the current reality.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES