Add `pending` to `query` functions
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
Similar to https://github.com/sveltejs/kit/issues/14080 but for query functions.
Would be nice to have pending state of a query in script while it's resolved somewhere deep in the template.
Describe the proposed solution
<script lang="ts">
import { getTags } from '$lib/remote/get-tags.remote.ts'
const buttonDisabled = $derived(getTags.pending)
</script>
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing query-function implementation and the related issue #14080. Trace how a query resolved deep in the template is represented in script, using the getTags example as the intended entry point. Done means query functions expose a usable pending state such as getTags.pending.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100