Skip to content

Instantly share code, notes, and snippets.

@omar-dulaimi
Created December 23, 2022 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omar-dulaimi/6a32994754aa3b9979b568616670e93e to your computer and use it in GitHub Desktop.
Save omar-dulaimi/6a32994754aa3b9979b568616670e93e to your computer and use it in GitHub Desktop.
How to make a GET request query params for tRPC
const query = { where: {} };
const queryString = encodeURIComponent(JSON.stringify(query));
const finalUrl = `http://127.0.0.1:3001/trpc/user.listUsers?${queryString}`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment