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.

More ways of structure keys

See original GitHub issue

It would be nice to have a third level in the factory. For example if you have 5 different api urls with 30 endpoints underneed and not only a single one

export const cmsKeys = createQueryKeys('cms', {
  content: {
    page: (locale: string, path: string) => [{ locale, path }],
    breadcrumb: (locale: string, path: string) => [{ locale, path }],
  }
});

So i can have a query like ['cms', 'content', 'page', { locale, path }].

Basically i would have multiple swagger interfaces like this one. So in this case i would like ['bff', 'basket', 'baskets', { basketReference }] image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TommySorensencommented, Oct 12, 2022

You should already be able to do that? Not sure you’re suggesting some feature or just giving an example of an idea you’re considering 😅, but I don’t see why you wouldn’t already be able to do

I guess it’s me trying to give more context to the talk 😀

1reaction
lukemoralescommented, Oct 10, 2022

@TommySorensen thanks for the suggestion and for sharing more information about your use cases. FYI v1.0.0 brings support for nested keys and the new API should be available soon, probably next week if the last mile goes smoothly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Basic Key Structure - KwikPick Lock and Safe
In the most basic sense, every key is coded for depth and length. A traditional key is composed of two major parts: the...
Read more >
7 Types of Organizational Structures +Examples, Key Elements
Here are the most common types of org structure, with examples, in 2022. ... Work specializations define how responsibilities are split ...
Read more >
Team structure: 10 effective ways to organize your team - Asana
A key feature of the functional structure is the ability to cultivate niche specialties within different departments. 3. Matrix structure. The ...
Read more >
Golang program that uses structs as map keys - GeeksforGeeks
In maps, most of the data types can be used as a key like int, string, float64, rune, etc. Maps also allow structs...
Read more >
StructFindKey - Adobe Support
Searches recursively through a substructure of nested arrays, structures, and other elements, for structures whose keys match the search key ...
Read more >

github_iconTop Related Medium Post

No results found

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