Skip to content

Instantly share code, notes, and snippets.

@Akiyamka
Last active July 21, 2020 14:53
Show Gist options
  • Save Akiyamka/4ab20d1a60be6fc1ef8745ed5291d1cf to your computer and use it in GitHub Desktop.
Save Akiyamka/4ab20d1a60be6fc1ef8745ed5291d1cf to your computer and use it in GitHub Desktop.
vscode ❤️ graphql - integration guide
  1. npm install ts-graphql-plugin -D
  2. ext install Prisma.vscode-graphql
  3. Create .graphqlconfig with folowing content (values for example):
schemaPath: schema/schema.graphql
includes: ["components/**/*.{graphql,ts,tsx}"]
extensions:
  endpoints:
    default: http://localhost:4000

Note: not use ./ notation in path

  1. Create tsconfig.json with folowing content (values for example):
{
  "plugins": [
      {
        "name": "ts-graphql-plugin",
        "schema": "schema/schema.graphql",
        "tag": "gql"
      }
   ]
}

Thanks @dmitryanderson for investigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment