Unable to use contextQueries when key contains 2 variables
See original GitHub issueMaybe I dont get something but this code produces this error: Type '[string, string]' is not assignable to type 'readonly [ValidValue]'. Source has 2 element(s) but target allows only 1.
export const keys = createQueryKeys('user', {
byId: (accountId: string, userId: string) => ({
queryKey: [accountId, userId],
contextQueries: {
likes: null,
},
}),
});
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Entity Framework - "Unable to create a constant value of type ...
The problem is, that EF a complex type, that is passed in the "Contains"-parameter, can not translate into an SQL query. EF can...
Read more >Using contexts and variables - Cloud - 8.0 - Talend Help Center
Variables represent values which change throughout the execution of a program. A global variable is a system variable which can be accessed by...
Read more >API Connect context variables - IBM
Name Description Permission
api.catalog.path The path segment that represents this Catalog. Read/write
api.endpoint.address The address of the API Gateway endpoint. Read/write
api.id The identifier of the...
Read more >Chapter 4. Query Performance Optimization - O'Reilly
In the previous chapter, we explained how to optimize a schema, which is one of the necessary conditions for high performance.
Read more >Relationships, navigation properties, and foreign keys - EF6
The model contains two entities that participate in one-to-many relationship. Both entities have navigation properties. Course is the dependent ...
Read more >Top Related Medium Post
No results found
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 FreeTop 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
Top GitHub Comments
@Kamahl19 oh yeah, definitely outdated examples, thanks for bringing me attention to them. I’ll make sure to update the readme and prevent this confusion again.
@lukemorales Sorry for my naive question but… why not a simple API supporting all valid keys such as:
There is no magic (prepending strings based on obj keys), no null keys, it allows all valid query keys and no _ctx and _def fields.
The output would be: