blitz-js / blitz-js/blitzjs.com
Documentation request: interacting with API endpoints
- Dominant language
- MDX
- Stars
- 188
- Forks
- 316
- PR merge metrics
- No merged PRs in 30d
Description
### What do you want and why?
My application uses mutations and queries for part of its operations, and API endpoints for other parts - where I'm dealing with a library like Replicache with its own assumptions / preferences about how requests work.
Doing this is not very obvious, and I've been able to get it to work, but it involves stuff like attaching the anti-csrf token yourself to your requests.
And I'm not sure my implementation is correct because i get a lot of scary AuthenticationErrors in production, which indicate that there's some magic in useQuery that is not documented or usable with API calls.
It would be great to get docs on this corner, which I know is a bit narrow, but still pretty important. If you have an API endpoint that gives you user avatar thumbnails, how do you auth it, end to end? Do cookies refresh based on it? Etc.
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the existing documentation for mutations, queries, API endpoints, and authentication first. Trace how anti-CSRF tokens, AuthenticationErrors, and cookie refresh are handled in the documented request flow, then document an end-to-end authenticated endpoint example and verify that it matches the actual behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, authentication, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100