A comprehensive VS Code extension for developing GraphQL APIs with StepZen, featuring intelligent schema management, import capabilities, and development tools.
- cURL Import - Convert REST endpoints to GraphQL with smart cURL parsing
- OpenAPI Import - Generate schemas from OpenAPI specifications
- GraphQL Import - Import existing GraphQL endpoints with authentication
- Database Import - Connect PostgreSQL, MySQL, Oracle, Snowflake, and more
- Smart Configuration - Auto-detect secrets, generate names, validate inputs
- Schema Indexing - Real-time analysis of GraphQL schemas and directives
- Type Definitions - Navigate and explore your schema structure
- Directive Support - Full support for StepZen directives (@rest, @dbquery, @graphql, etc.)
- File Watching - Automatic updates when schema files change
- CLI Integration - Seamless StepZen CLI command execution
- Project Management - Initialize and manage StepZen projects
- Request Testing - Execute GraphQL operations directly from VS Code
- Error Handling - Comprehensive error reporting and validation
- Auto-completion - Intelligent suggestions for StepZen directives
- Syntax Highlighting - Enhanced GraphQL syntax support
- Schema Validation - Real-time validation of schema files
- GraphQL Linting - Comprehensive GraphQL schema linting with custom rules
- Quick Actions - Context-aware commands and shortcuts
- Install the extension from the VS Code Marketplace
- Ensure you have the StepZen CLI installed
- Open a workspace and start building GraphQL APIs
# Command Palette: "StepZen: Import cURL"
# Paste your cURL command or endpoint URL
curl -H "Authorization: Bearer token" https://api.github.com/user
# Command Palette: "StepZen: Import Database"
# Select database type and provide connection details
postgresql://user:pass@localhost:5432/mydb
# Command Palette: "StepZen: Import GraphQL"
# Provide endpoint and authentication
https://api.github.com/graphql
# Command Palette: "StepZen: Import OpenAPI"
# Select local file or provide URL
https://petstore.swagger.io/v2/swagger.json
StepZen: Import cURL
- Import REST endpoints using cURL syntaxStepZen: Import OpenAPI
- Import from OpenAPI/Swagger specificationsStepZen: Import GraphQL
- Import existing GraphQL endpointsStepZen: Import Database
- Import database schemas (PostgreSQL, MySQL, etc.)
StepZen: Initialize Project
- Create a new StepZen projectStepZen: Deploy Schema
- Deploy your schema to StepZenStepZen: Run GraphQL Request
- Execute GraphQL operationsStepZen: Open Schema Visualizer
- Visualize your schema structureStepZen: Lint GraphQL Schema
- Lint GraphQL schema files with custom rules
StepZen: Generate Operations
- Create sample GraphQL operationsStepZen: Validate Schema
- Check schema for errorsStepZen: Show Logs
- View extension logs and debugging info
The extension includes comprehensive GraphQL schema linting with custom rules:
- Real-time Linting - Automatically lint GraphQL files as you type (optional)
- Comprehensive Rules - Built-in GraphQL best practices and StepZen-specific rules
- VS Code Integration - Linting errors and warnings appear in the Problems panel
- Customizable Rules - Configure linting rules through VS Code settings
Enable automatic linting in your VS Code settings:
{
"stepzen.autoLintGraphQL": true
}
Use the command palette to manually lint your GraphQL schema:
- Open Command Palette (
Ctrl+Shift+P
/Cmd+Shift+P
) - Run
StepZen: Lint GraphQL Schema
- View results in the Problems panel
- Auto-detection of authentication headers and secrets
- Path parameter extraction and configuration
- Query name generation from URL paths
- Schema naming from hostnames
- Multiple database types: PostgreSQL, MySQL, IBM Db2, Oracle, Snowflake, Presto
- Flexible connection: Connection strings or individual parameters
- Auto-linking: Automatic
@materializer
relationships - Advanced options: Schema selection, table filtering, custom naming
- Bearer tokens for API authentication
- API key headers with custom header names
- Basic authentication with username/password
- Custom headers for proprietary auth schemes
- Secret management with automatic detection and secure storage
- Working directories for organized project structure
- Schema naming with validation and suggestions
- Type prefixes to avoid naming conflicts
- Advanced settings for fine-tuned control
The extension follows a layered architecture with clear separation of concerns:
Extension Layer (Commands, Panels, Utils)
↓
Service Registry (CLI, Logger, Import, SchemaIndex, Request, GraphQLLinter)
↓
Schema Processing Layer (Indexer, Linker, Parser)
↓
Types (Pure data structures)
- ImportService - Handles all import operations with type-specific builders
- SchemaIndexService - Real-time schema analysis and indexing
- GraphQLLinterService - GraphQL schema linting with graphql-eslint
- StepzenCliService - CLI integration and command execution
- Logger - Comprehensive logging and debugging
- RequestService - GraphQL request execution
{
"stepzen.cliPath": "/path/to/stepzen",
"stepzen.logLevel": "info",
"stepzen.autoValidate": true,
"stepzen.defaultWorkingDir": "./stepzen",
"stepzen.autoLintGraphQL": false
}
The extension automatically detects StepZen projects and provides context-aware features based on your stepzen.config.json
and schema files.
- Node.js 16+
- VS Code 1.74+
- StepZen CLI
git clone https://github.com/stepzen-dev/vscode-stepzen
cd vscode-stepzen
npm install
npm run compile
npm test # Run all tests
npm run test:unit # Unit tests only
npm run test:integration # Integration tests only
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
CLI Not Found
- Ensure StepZen CLI is installed and in your PATH
- Set
stepzen.cliPath
in VS Code settings if needed
Import Failures
- Check network connectivity for remote resources
- Verify authentication credentials
- Review VS Code output panel for detailed error messages
Schema Validation Errors
- Ensure GraphQL syntax is correct
- Check StepZen directive usage
- Validate file paths and references
GraphQL Linting Issues
- Check that GraphQL files have valid syntax
- Verify VS Code settings are correct
- Review extension output for error messages
- Check the StepZen Documentation
- Review extension logs in VS Code Output panel
- Report issues on GitHub
This extension is licensed under the MIT License. See LICENSE for details.
Portions of the Content may be generated with the assistance of CursorAI