[redux-saga-requests-graphql]Argument of type 'TemplateStringsArray' is not assignable to parameter of type 'string'.
See original GitHub issueTypescript seems to be crying when I try to use “gql” from “redux-saga-requests-graphql” Can be resolved by adding “TemplateStringsArray” as a possible type for “gql” arguments. Pull request in progress
btw, your lib rocks
ERROR in /<<workspace>>/actions.tsx(7,15):
7:15 Argument of type 'TemplateStringsArray' is not assignable to parameter of type 'string'.
5 | type: anAction,
6 | request: {
> 7 | query: gql`
| ^
8 | {
9 | a request
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
TypeScript: Tagged Template Literals shows Error
In toString method, typescript is showing me following error. Argument of type 'TemplateStringsArray' is not assignable to parameter of type ' ...
Read more >Argument of type 'TemplateStringsArray' is not assignable to ...
I am getting the Typescript error message. Argument of type 'TemplateStringsArray' is not assignable to parameter of type 'string'.ts(2345).
Read more >Documentation - Template Literal Types - TypeScript
Template literal types build on string literal types, and have the ability to ... Argument of type '"firstName"' is not assignable to parameter...
Read more >Argument of type 'string' is not assignable to parameter of type
The React component works fine and displays the right icon based on the string it receives back from the API based on my...
Read more >Template literals (Template strings) - JavaScript | MDN
However, a tagged template literal may not result in a string; ... If specified, it will be called with the template strings array...
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
I tried this:
I believe the correct type is actually
As some people like to have dynamic queries, even though only static ones are officially recommended
@fhourdin merged in newest version