You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi team, would request a help on debugging the types of response like this code example here:
letcursor: InputMaybe<string>|undefined=undefined;constresponse=awaitadmin.graphql(`#graphql query SyncProducts($cursor: String) { products(first: 10, after: $cursor) { edges { node { id title handle status } cursor } pageInfo { hasNextPage } } }`,{variables: {
cursor,},},);
In the code above I am getting error:
'response' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer
But if I directly use "cursor: undefined" in variables, I don't see any type errors any more (same if I use null). How to correctly infer the response type when using variables like cursor here? Am I mis-use any graphql codegen configs?
The text was updated successfully, but these errors were encountered:
Hi team, would request a help on debugging the types of response like this code example here:
In the code above I am getting error:
But if I directly use "cursor: undefined" in variables, I don't see any type errors any more (same if I use null). How to correctly infer the response type when using variables like cursor here? Am I mis-use any graphql codegen configs?
The text was updated successfully, but these errors were encountered: