Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant