logo_smallAxellero.io

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

FeatureDescription
Auto-completionContext-aware suggestions for variables, functions, and schema elements
Schema IntegrationAutomatic database and GraphQL schema discovery
Workflow ContextDirect access to data from other nodes via ctx object
Real-time ValidationSyntax checking and error detection

Language Support

LanguageNodesKey Axellero Features
SQLPostgreSQL, OracleTable/column completion, parameter binding
GraphQLGraphQL connectorSchema-based field completion
JavaScriptException, Code executionBuilt-in functions, workflow context
JSONConfiguration nodesSchema 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

DatabaseSyntaxExample
PostgreSQL@parameter_nameWHERE 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

CategoryFunctions
Networkfetch(url, options)
Encodingbase64encode(), base64decode()
Cryptocrypto.sha256(), crypto.aes.encrypt()
Randomrandom.uuid(), random.int(), random.string()
Conversionconvert.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].name

Variables and Constants

// Workflow variables
ctx.vars.{variableName}
ctx.consts.{constantName}

// User context
ctx.user.id
ctx.user.login
ctx.user.roles

Auto-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:

ContextDescriptionExample
ctx.nodes.*Outputs from other workflow nodesctx.nodes.userApi.outputs.name
ctx.vars.*Workflow runtime variablesctx.vars.apiKey
ctx.consts.*Workflow constantsctx.consts.API_URL
ctx.user.*Current user informationctx.user.id
ctx.workspace_slugCurrent workspacectx.workspace_slug

Auto-completion Triggers

  • Automatic: Triggered by . and context patterns
  • Manual: Ctrl+Space to force completion menu
  • Parameters: Ctrl+Shift+Space for 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.error

Parameter 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);