GraphQL Intel
GraphQL Intel is a Visual Studio Code extension that helps you navigate and find GraphQL files with ease. It provides commands to locate and open GraphQL types, fields, and resolvers in your codebase.
Installation
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing
Ctrl+Shift+X
.
- Search for "GraphQL Intel".
- Click "Install" to install the extension.
Usage
Commands
Find GraphQL Type
Locates and opens the file that contains the definition of a particular GraphQL type.
- Open the Command Palette by pressing
Ctrl+Shift+P
.
- Type
Find GraphQL Type
and select the command.
- Enter the name of the GraphQL type you want to find.
- The extension will locate and open the file that contains the definition of the specified type.
Find GraphQL Field
Locates and opens the file that contains the definition of a particular field of a GraphQL type.
- Open the Command Palette by pressing
Ctrl+Shift+P
.
- Type
Find GraphQL Field
and select the command.
- Select the GraphQL type from the list.
- Select the field name for the selected type.
- The extension will locate and open the file that contains the definition of the specified field.
Find GraphQL Resolver
Locates and opens the file that contains the definition of a resolver.
- Open the Command Palette by pressing
Ctrl+Shift+P
.
- Type
Find GraphQL Resolver
and select the command.
- Select the GraphQL resolver type (Query, Mutation, or Type).
- If "Type" is selected, choose the GraphQL type from the list.
- Select the resolver name for the selected type.
- The extension will locate and open the file that contains the definition of the specified resolver.
Configuration
The extension reads the configuration from a graphql-lens.config.json
file in the root of your workspace. The configuration file should contain the following fields:
{
"graphqlFolder": "src",
"tabSize": 2
}
graphqlFolder
: The folder where your GraphQL files are located. The default value is src
.
tabSize
: The number of spaces used for indentation in your GraphQL files. The default value is 2
.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
License
This extension is licensed under the MIT License. See the LICENSE file for more details.