David
Best way to get the type of the first argument for .query or .mutation
Maybe its best I just explain what im looking to achieve.
For file uploads our current flow is:
1. Get upload token through query
2. Use upload token to upload directly to S3 from browser
3. Call mutation to do something with this finished upload
We currently reuse the same logic everywhere for this, but we've gotten to a point where quite often we want to do some type of server-side logic before returning an upload token, or after uploading.
So I want to create a function that takes in a couple of arguments to help with this, and returns a router.
So we can do something like:
10 replies
"fetch failed" when building
So, some observations:
The request is happening even before the browser renders, it does not show in the network tab in the browser, there are no cookies attached to the request when logging it on the server side
Everything works in the background, as in the browser renders and makes a valid request etc.
It does not end up in our root error boundary
But any call to that specific procedure causes it. So if I only render that specific query it'll happen, even though I render it as we would anywhere else in some page.
Only occurs for this specific procedure, taking out the code it errors on (cookie / auth stuff) fixes it, even though a bunch of other procedures use that same middleware
25 replies
"fetch failed" when building
Have looked through the commit where it started several times, I can't find anything that would cause this. All our fetches/hook calls are inside of components, nothing at the root level.
Any idea how I could see a better stack trace that may lead to where its coming from?
25 replies