T
TanStack6mo ago
inland-turquoise

h3 `getValidatedQuery` not working after devinxi?

I'm about to create a repro when I have some time but I was wondering: is getValidatedQuery (to parse query params), which is now apparently from h3 supposed to work the same as vinxi's one? I'm on:
"@tanstack/react-router": "1.121.34",
"@tanstack/react-router-with-query": "1.121.34",
"@tanstack/react-start": "1.121.34"
"@tanstack/react-router": "1.121.34",
"@tanstack/react-router-with-query": "1.121.34",
"@tanstack/react-start": "1.121.34"
and running:
import {
getValidatedQuery,
readValidatedBody,
} from "@tanstack/react-start/server";

await getValidatedQuery((query) => {
console.log(query);
return true;
});
import {
getValidatedQuery,
readValidatedBody,
} from "@tanstack/react-start/server";

await getValidatedQuery((query) => {
console.log(query);
return true;
});
gives me an empty object ([Object: null prototype] {} to be precise) inside a:
export const ServerRoute = createServerFileRoute("/api/auth/google/").methods({ ... });
export const ServerRoute = createServerFileRoute("/api/auth/google/").methods({ ... });
route with:
/api/auth/google?redirect=abc&def=123
/api/auth/google?redirect=abc&def=123
as a URL.
13 Replies
inland-turquoise
inland-turquoiseOP6mo ago
The code hasn't changed and with vinxi everything worked correctly,
jolly-crimson
jolly-crimson6mo ago
is this when running the dev server or when running the prod build?+
inland-turquoise
inland-turquoiseOP6mo ago
@Manuel Schiller Dev server
jolly-crimson
jolly-crimson6mo ago
a reproducer would be helpful.
inland-turquoise
inland-turquoiseOP6mo ago
@Manuel Schiller I'll work on that. Anything in your experience that could cause this?
jolly-crimson
jolly-crimson6mo ago
not directly. seems like the query is lost somehow along the chain
inland-turquoise
inland-turquoiseOP6mo ago
@Manuel Schiller is there a quick repo I can clone and add on top of by any chance?
jolly-crimson
jolly-crimson6mo ago
Quick Start | TanStack Start React Docs
Impatient? If you're impatient, you can clone and run the example right away with the following commands: bash npx gitpick TanStack/router/tree/main/examples/react/start-basic start-basic cd start-bas...
inland-turquoise
inland-turquoiseOP6mo ago
Awesome thanks ❤️
inland-turquoise
inland-turquoiseOP6mo ago
@Manuel Schiller Opened a bug report here: https://github.com/TanStack/router/issues/4536
GitHub
getValidatedQuery always returns {} · Issue #4536 · TanStack/...
Which project does this relate to? Router Describe the bug The new getValidatedQuery from TSS keeps returning no query params (and/or works differently from how the equivalent function worked with ...
inland-turquoise
inland-turquoiseOP6mo ago
🤞
multiple-amethyst
multiple-amethyst5mo ago
would be awesome if we can know if this is being fixed or not, currently we planning to move to the newer version, but h3 utils not working in api routes, is stopping us from doing that
jolly-crimson
jolly-crimson5mo ago
GitHub
Release v1.125.6 · TanStack/router
Version 1.125.6 - 7/7/25, 6:14 PM Changes Fix correct url in dev server (#4593) (ba6f0ba) by Manuel Schiller set component return type to any by default (#4592) (7ff52af) by Manuel Schiller Docs ...

Did you find this page helpful?