graphql / vscode-graphql

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

Autocomplete not working #325

Closed Pramuspl closed 2 years ago

Pramuspl commented 3 years ago

Actual Behavior

query/mutation auto-complete is not working

Expected Behavior

query/mutation auto-complete should be working

Steps to Reproduce the Problem Or Description

Created the following config file (with url to my GraphQL server, opening it in the browser opens Playground which I enabled) and installed the extension

//graphql.config.js
module.exports = {
  extensions: {
    endpoints: {
      default: {
        url: "http://<my_url>:3000/graphql",
      },
    },
  },
};

Specifications

Logs Of TS Server || GraphQL Language Service

9/25/2021, 6:52:35 PM [4] (pid: 18905) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
(node:18905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18905) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
is in debug mode: false
is in debug mode: false
(node:18905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
[Error - 6:52:39 PM] Request textDocument/documentSymbol failed.
  Message: Request textDocument/documentSymbol failed with message: A cached document cannot be found.
  Code: -32603 
[Error - 6:52:40 PM] Request textDocument/documentSymbol failed.
  Message: Request textDocument/documentSymbol failed with message: A cached document cannot be found.
  Code: -32603 
sdykae commented 2 years ago

any news?

acao commented 2 years ago

@Pramuspl you need to specify a schema key, it is required. see graphql-config documentation, or our readme