Code Editing & Schema Reference
Code editors, auto-completion, and schema integration in Axellero nodes.
Axellero's code editors provide intelligent auto-completion, schema integration, and workflow context access for SQL, GraphQL, JavaScript, and other languages used in workflow nodes.
Editor Features
| Feature | Description |
|---|---|
| Auto-completion | Context-aware suggestions for variables, functions, and schema elements |
| Schema Integration | Automatic database and GraphQL schema discovery |
| Workflow Context | Direct access to data from other nodes via ctx object |
| Real-time Validation | Syntax checking and error detection |
Language Support
| Language | Nodes | Key Axellero Features |
|---|---|---|
| SQL | PostgreSQL, Oracle | Table/column completion, parameter binding |
| GraphQL | GraphQL connector | Schema-based field completion |
| JavaScript | Exception, Code execution | Built-in functions, workflow context |
| JSON | Configuration nodes | Schema validation |
SQL Editors
Auto-completion
- Tables/Columns: Automatic suggestions from connected database schema
- Keywords: SQL function and keyword completion
- Parameters: Auto-complete for workflow variables
Parameter Binding
| Database | Syntax | Example |
|---|---|---|
| PostgreSQL | @parameter_name | WHERE status = @user_status |
| Oracle | ? (positional) | WHERE department_id = ? |
Schema Discovery
Axellero automatically fetches table and column information from connected databases, providing intelligent completion for:
- Table names from your database schema
- Column names and data types
- Available schemas and views
GraphQL Editors
Schema-Based Completion
- Field Names: Auto-complete based on GraphQL schema
- Arguments: Required and optional argument suggestions
- Types: Enum values and input type completion
- Variables: Variable name and type completion
Schema Integration
- Automatic schema introspection from GraphQL endpoints
- Real-time validation against current schema
- Field deprecation warnings and documentation
JavaScript Editors
Axellero Built-in Functions
| Category | Functions |
|---|---|
| Network | fetch(url, options) |
| Encoding | base64encode(), base64decode() |
| Crypto | crypto.sha256(), crypto.aes.encrypt() |
| Random | random.uuid(), random.int(), random.string() |
| Conversion | convert.xmlToJSON(), convert.jsonToXML() |
Workflow Context Access
Node Outputs
// Access outputs from other nodes
ctx.nodes.{nodeName}.outputs.{fieldName}
ctx.nodes.apiCall.outputs.response.data
ctx.nodes.dbQuery.outputs.rows[0].nameVariables and Constants
// Workflow variables
ctx.vars.{variableName}
ctx.consts.{constantName}
// User context
ctx.user.id
ctx.user.login
ctx.user.rolesAuto-completion Triggers
- Type
ctx.to see all available context - Type
ctx.nodes.to see all workflow nodes - Type node name to see outputs, metadata, and error properties
Universal Features
Context Variable Access
All code editors provide auto-completion for:
| Context | Description | Example |
|---|---|---|
ctx.nodes.* | Outputs from other workflow nodes | ctx.nodes.userApi.outputs.name |
ctx.vars.* | Workflow runtime variables | ctx.vars.apiKey |
ctx.consts.* | Workflow constants | ctx.consts.API_URL |
ctx.user.* | Current user information | ctx.user.id |
ctx.workspace_slug | Current workspace | ctx.workspace_slug |
Auto-completion Triggers
- Automatic: Triggered by
.and context patterns - Manual:
Ctrl+Spaceto force completion menu - Parameters:
Ctrl+Shift+Spacefor function signatures
Schema Discovery
Axellero automatically discovers and caches schemas from:
- Connected database connections (PostgreSQL, Oracle)
- GraphQL endpoints with introspection enabled
- JSON schemas from API responses
Integration Patterns
Cross-Node Data Flow
// Use database results in JavaScript
const users = ctx.nodes.postgresQuery.outputs.rows;
const activeUsers = users.filter(u => u.status === 'active');-- Use API data in SQL query
SELECT * FROM orders
WHERE user_id = @selected_user_id
AND status = @order_status;Variables:
{
"selected_user_id": "{{ctx.nodes.userApi.outputs.user.id}}",
"order_status": "{{ctx.nodes.config.outputs.defaultStatus}}"
}Error Handling
// JavaScript callback pattern
if (!ctx.nodes.input.outputs.email) {
callback(null, {
code: 'MISSING_EMAIL',
message: 'Email is required'
});
return;
}
callback({ success: true, data: result }, null);Quick Reference
Common Context Patterns
// Check if node has data
ctx.nodes.apiCall.outputs.rows.length > 0
// Access nested object data
ctx.nodes.response.outputs.data.user.profile.name
// Use in conditions
ctx.nodes.validation.outputs.isValid === true
// Access error information
ctx.nodes.apiCall.errorParameter Usage
-- PostgreSQL named parameters
WHERE created_at > @start_date AND status = @user_status
-- Oracle positional parameters
WHERE department_id = ? AND salary > ?Built-in JavaScript Functions
// Generate UUID
const id = random.uuid();
// Hash password
const hash = crypto.sha256(password);
// Make HTTP request
const response = await fetch(apiUrl, { method: 'POST' });
// Convert data
const json = convert.xmlToJSON(xmlData);