question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

query keys in query string

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
misterohcommented, Sep 27, 2016

awesome! thanks!!

1reaction
amielcommented, Sep 27, 2016

Ok, I just released 0.2.0 with this hack.

With this change, you should be able to remove either hack (sortQueryParams, or the delete 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found