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

Documentation request: interacting with API endpoints #773

Open
tmcw opened this issue Aug 24, 2022 · 2 comments
Open

Documentation request: interacting with API endpoints #773

tmcw opened this issue Aug 24, 2022 · 2 comments

Comments

@tmcw
Copy link
Contributor

tmcw commented Aug 24, 2022

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.

@itsdillon
Copy link
Member

We definitely need to and will put more details into our documentation.

@beerose beerose transferred this issue from blitz-js/blitz Oct 1, 2022
@oyatek
Copy link

oyatek commented Jan 6, 2023

In past invokeWithMiddleWare was used in API endpoints, now it seems to be abandoned. What is the actual way now? Just invoke(methodName, params)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants