query keys in query string
See original GitHub issueThe docs for query show how to include just certain keys in a request, but in my use I am still seeing the query keys being included in the query string. For example:
// example request and template
this.store.query('app', { 'appName': 'foo' })
queryUrlTemplate: '{+host}/apps/{appName}/app'
Yields this url:
https://foo.com/apps/foo/app?appName=foo
When I really want just this:
https://foo.com/apps/foo/app
Are the docs incorrect or is there something I’m doing incorrectly here?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Query Keys | TanStack Query Docs
Query keys have to be an Array at the top level, and can be as simple as an Array with a single string,...
Read more >How to Use Query Strings and Parameters for Marketers
This is a guide on query strings and parameters for marketers. Learn how to use text in a URL (query strings) for UTM...
Read more >What Are Query Strings & Parameters - How to Optimize
A query string is a set of characters tacked onto the end of a URL. The query string begins after the question mark...
Read more >Query string - Wikipedia
The query string is composed of a series of field-value pairs. · Within each pair, the field name and value are separated by...
Read more >What Are Query Parameters? - apilayer Blog
The additional key-value pairs that occur after the question mark in the URL are referred to as API query parameters.
Read more >
Top Related Medium Post
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
awesome! thanks!!
Ok, I just released 0.2.0 with this hack.
With this change, you should be able to remove either hack (
sortQueryParams
, or thedelete
hack).Note that if you were using
sortQueryParams
for another reason, or depend on the fact that the query params were already appended, this could cause unintended changes.