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

Query param not working in example/with-nuxtjs #438

Open
imding opened this issue Feb 24, 2024 · 0 comments
Open

Query param not working in example/with-nuxtjs #438

imding opened this issue Feb 24, 2024 · 0 comments

Comments

@imding
Copy link

imding commented Feb 24, 2024

Hi I am having some issue getting query params to come through in a Nuxt project.

Steps to reproduce:

  1. gh repo clone jlalmes/trpc-openapi
  2. cd trpc-openapi/examples/with-nuxtjs
  3. pnpm add jsonwebtoken trpc-openapi uuid zod @types/jsonwebtoken @types/uuid
  4. pnpm i
  5. remove .optional() from the /posts route input
    image
  6. pnpm dev
  7. make GET request to /posts route with userId query param
    image

What I found:

  1. the code for extracting query params and adding them to the input is here
    image
  2. the nuxt adapter sets the url field using the pathname here, which does not include the ?param=value part of the url
    image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant