graphql / vscode-graphql

MIGRATED: VSCode GraphQL extension (autocompletion, go-to definition, syntax highlighting)
https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql
MIT License
555 stars 71 forks source link

impossible to get vscode-graphql to work (autocomplete/go to definition) #315

Closed waterdrop01 closed 3 years ago

waterdrop01 commented 3 years ago

Actual Behavior

Here is my .graphqlrc.yml:

projects:
  first:
    schema: ./first.graphql
    documents: ./src/first-gql.js
  second:
    schema: ./second.graphql
    documents: ./src/second-gql.js

Here is my ./src/first-gql.js file:

const queryUsers = gql`
  query users($first: Int) {
    users(first: $first) {
      id
      symbol
    }
  }
`;

Here is my ./src/second-gql.js file:

const subscribeAdminNotification = gql`
  subscription admin_notification(
    $limit: Int
    $order_by: [admin_notification_order_by!]
    $where: admin_notification_bool_exp
  ) {
    admin_notification(limit: $limit, order_by: $order_by, where: $where) {
      id
      level
    }
  }
`;

But when editing a gql tag inside either src/first-gql.js or src/second-gql.js, there isn't any sign of the presence/activation of vscode-graphql plugin (except for the execute query button).

I tried using only one schema in the .graphqlrc.yml or adding "vscode-graphql.useSchemaFileDefinitions": true to the settings, but it changes nothing.

I also tried reinstalling the plugin in VSCODE. No change.

Expected Behavior

Few months ago, I remember seeing visual signs of assistance being provided by the plugin (at least autocomplete, go to definition)

Steps to Reproduce the Problem Or Description

Specifications

Logs Of TS Server || GraphQL Language Service

Could you please explain how to get the logs? I set "vscode-graphql.debug": true, in settings, but see nothing in the console.

Many thanks for your help!

waterdrop01 commented 3 years ago

solved by this fix https://github.com/dotansimha/graphql-eslint/issues/526