- Syntax highlighting for
.graphqlfiles based on tree-sitter-graphql - Outline view for
.graphqlfiles - Operation detection in
.ts,.tsx,.js,.jsx,.vue,.astroand.sveltefiles through GraphQL tags and comments - Autocompletion
- Query validation
- Hover hints
Several features depend on the GraphQL language server which requires a config file.
Simple config exmaple:
# graphql.config.yml
schema: 'schema.graphql' # or 'http://localhost:9876/graphql'
documents: 'src/**/*.{graphql,js,ts,jsx,tsx}'Several file formats and configuration options are available. For further details please refer to the documentation for graphql-config
By default, the LSP attempts to load a config file from the workspace root directory. To specify the config file directory add the following to Zed settings:
{
// ...
"lsp": {
"graphql": {
"settings": {
"config_dir": "./nested-directory"
}
}
}
}