DEV Community

Cover image for gql.tada -- strongly typed + neat intellisense

gql.tada -- strongly typed + neat intellisense

Since I was introduced to GraphQL I really wanted to have one thing. Strongly typed client where I get intellisense in VSCode and the return type is typed according to what I have in my query/mutation.

Something similar to Prisma where your return type changes based on the fields you have selected or the joins.

So I tried https://gql-tada.0no.co

But then I had a headache. Whatever I did VSCode was not showing me the intellisense and types.

So then I had to select the version manually like this:

Or you can basically create a .vscode/settings.json and add the following settings:

{
  "typescript.tsdk": "node_modules/typescript/lib", // deprecated, you won't hopefully need this one
  "typescript.enablePromptUseWorkspaceTsdk": true, // deprecated, you won't hopefully need this one
  "js/ts.tsdk.path": "node_modules/typescript/lib",
  "js/ts.tsdk.promptToUseWorkspaceVersion": true
}
Enter fullscreen mode Exit fullscreen mode

GH Repo

https://github.com/kasir-barati/awesome-js-ts/tree/main/apps/gql-tada-playground

Top comments (0)