Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephen/vscode-graphql
:grapes: A GraphQL extension for vscode with support for autocomplete, go to def, and more
https://github.com/stephen/vscode-graphql
graphql vscode vscode-extension
Last synced: 13 days ago
JSON representation
:grapes: A GraphQL extension for vscode with support for autocomplete, go to def, and more
- Host: GitHub
- URL: https://github.com/stephen/vscode-graphql
- Owner: stephen
- License: mit
- Created: 2017-07-09T06:58:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-03T11:53:38.000Z (over 1 year ago)
- Last Synced: 2024-07-31T07:18:59.917Z (3 months ago)
- Topics: graphql, vscode, vscode-extension
- Language: TypeScript
- Homepage:
- Size: 167 KB
- Stars: 42
- Watchers: 6
- Forks: 8
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome - vscode-graphql - :grapes: A GraphQL extension for vscode with support for autocomplete, go to def, and more (TypeScript)
README
# vscode-graphql
Syntax highlighting, diagnostics, autocomplete, and go to definition for `.graphql` / `.gql` files.## Features
- Syntax highlighting
- Autocomplete
- Go to definition
- Error diagnosticsAutocomplete, go to definition, and diagnostics are language server features supported by the [graphql-language-service](https://github.com/graphql/graphql-language-service/).
## Installation
Install [stpn.vscode-graphql](https://marketplace.visualstudio.com/items?itemName=stpn.vscode-graphql) from the marketplace or from the command line with:
```
code --install-extension stpn.vscode-graphql
```## Configuration
Language server features will be enabled when a `.graphqlconfig` file is found in the project.Using the language server will require a schema to be specified via a `.graphqlconfig` file.
Example:
```json
{
"schemaPath": "./schema.json"
}
```See [here](https://github.com/graphcool/graphql-config#usage) for other ways to provide a GraphQL schema.
## Developing
### Debugging `graphql-language-service`
The language service is run, and debugged, as a standalone Node.js process. See [Node.js debugging guide](https://nodejs.org/en/docs/guides/debugging-getting-started/) for general information.
The simplest way to debug is to open chrome://inspect in Chrome and browse for the process. Alternatively in the test target VSCode (i.e. where the extension is running) toggle View → Output and follow the printed instructions.