'How to configure GraphQL extension for VSCode?

I'm trying to configure VSCode GraphQL extension, but its info is some obscure for me.

I have this basic Flutter project structure:

.
├── analysis_options.yaml
├── android
├── assets
├── lib
│   ├── graphql
│   │   └── *.gql
│   ├── main.dart
│   ├── private
│   │   └── graphql.config.json
│   └── shared
├── pubspec.lock
├── pubspec.yaml
├── README.md
├── test
└── tutorial_with_hasura_server.iml

I've created graphql.config.json into ./lib/private directory with this setting:

{
  "schema": {
    "request": {
      "url": "https://hasura.io/learn/graphql",
      "method": "POST",
      "postIntrospectionQuery": true,
      "options": {
        "headers": {
          "Authorization": "Bearer 1234567890123456789"
        }
      }
    }
  }
} 

Meanwhile in VSCode settings.json I've added this line:

"graphql-config.load.filePath": "./lib/private/graphql.config.json",

I'm trying to run a simple GraphQL query operation which is stored in a file with extension GQL located in ./lib/graphql directory, but no result, no error message, nothing at all. What am I missing?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source