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

Go to definition not working #266

Closed ITSWYoo closed 2 years ago

ITSWYoo commented 3 years ago

Actual Behavior

Go to definition to another schema file not working. Go only to the definition in that file.

Expected Behavior

Go to definition to another schema file

If I add documents, I can move to the definition of another file. However, Type "XXX" already exists in the schema. It cannot also be defined in this type definition. An error occurs.

schema: 'packages/server/graphql/schema/**/*.schema.gql'
exclude: 'packages/**/graphql/documents/**/*.gql'
documents: 'packages/server/graphql/schema/**/*.schema.gql'
extensions:
  customDirectives:
    - directive @client on FIELD
  languageService:
      useSchemaFileDefinitions: true

Steps to Reproduce the Problem Or Description

# .graphqlrc.yml
schema: 'packages/server/graphql/schema/**/*.schema.gql'
exclude: 'packages/**/graphql/documents/**/*.gql'
extensions:
  customDirectives:
    - directive @client on FIELD
  languageService:
      useSchemaFileDefinitions: true
// vscode settings.json 
{
  "workbench.colorTheme": "One Dark Pro",
  "workbench.iconTheme": "vscode-icons",
  "window.zoomLevel": 0,
  "eslint.alwaysShowStatus": true,
  "terminal.integrated.shellArgs.osx": [],
  "files.associations": {
    "*.js": "javascriptreact"
  },
  "javascript.format.enable": false,
  "eslint.format.enable": true,
  "typescript.updateImportsOnFileMove.enabled": "always",
  "editor.suggestSelection": "first",
  "java.semanticHighlighting.enabled": true,
  "java.configuration.checkProjectSettingsExclusions": false,
  "editor.largeFileOptimizations": false,
  "javascript.updateImportsOnFileMove.enabled": "always",
  "editor.tabSize": 2,
  "json.maxItemsComputed": 20000,
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    // For ESLint
    "source.fixAll.eslint": true
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "vscode-graphql.useSchemaFileDefinitions": true,
  "editor.fontLigatures": null
}

Specifications

mattalexander-pantheon commented 3 years ago

Is this project dead? There's been no bug fixes for months.

snys98 commented 3 years ago

I'm also having this problem, but not sure if it's the same one.

d09baeb8aee9c349528837c4956e8f0

it seems that the reference model got a wrong uri of the definition file.

9119aa39ac17929d9a1fbe995920d3e

besides, the reference count is 1, but code goes to the case of 0. I'm not sure if this is a problem of sourcemap. image

thanks.

Extension Version: v0.3.16

VS Code Version:

Version: 1.59.0 (system setup) Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8 Date: 2021-08-04T23:13:12.822Z Electron: 13.1.7 Chrome: 91.0.4472.124 Node.js: 14.16.0 V8: 9.1.269.36-electron.0 OS: Windows_NT x64 10.0.19043

sdykae commented 3 years ago

any news, same problen, intellisense works on files with name.ts but with name.something.ts don't

image From image I got good completions(no definitions) from files with name pattern like something.ts but when the name is like name.something.ts, there are no completions nor definitions

acao commented 2 years ago

@mattalexander-pantheon there are no active maintainers at the moment. I was paid to work on it briefly last year but then was pivoted to other work

new releases should have been issued!

the documentSymbol bug will show but all features and config should work