Description
When using GraphJin with MSSQL (SQL Server), certain column names are incorrectly mapped in the generated SQL. GraphJin appears to apply a camelCase transformation that strips underscores from some column names, producing SQL column names that don't match the actual database schema.
Environment
- GraphJin version: 3.16.2
- Database: Microsoft SQL Server 2016 (named instance)
- OS: macOS (darwin)
Reproduction
Given an MSSQL table Theatre_Master with columns like Is_Active, Is_DCI, property_id, Equipment_Type:
Works correctly
{ theatre_master(limit: 3) { theater_id theater_name city ckt_id region_id } }
These columns map correctly:
theater_id → Theater_Id ✅
theater_name → Theater_Name ✅
ckt_id → Ckt_Id ✅
region_id → Region_ID ✅
Broken columns
{ theatre_master(limit: 3) { is_active is_dci property_id equipment_type } }
| GraphQL field |
GraphJin generates |
Actual DB column |
Error |
is_active |
IsActive |
Is_Active |
mssql: Invalid column name 'IsActive' |
is_dci |
IsDCI |
Is_DCI |
mssql: Invalid column name 'IsDCI' |
property_id |
propertyId |
property_id |
mssql: Invalid column name 'propertyId' |
equipment_type |
(not found) |
Equipment_Type |
field 'equipment_type' is not a column or a function |
The same pattern occurs across multiple tables — any column with is_ prefix or a lowercase word_word pattern gets incorrectly camelCased.
Expected behavior
GraphJin should use the exact column names as introspected from INFORMATION_SCHEMA.COLUMNS (or sys.columns) when generating SQL for MSSQL. The camelCase transformation should not be applied to MSSQL column names since MSSQL schemas commonly use mixed naming conventions (PascalCase_With_Underscores, lowercase_with_underscores, Is_PascalCase).
Config
Using auto-discovery (tables: []) with no explicit column configuration:
databases:
default:
type: mssql
host: 10.25.5.25
port: 5205
dbname: VMPL_DATA
user: myuser
password: mypass
Workaround
Currently using node-mssql for queries involving affected columns. Would prefer to use GraphJin for all reads.
Description
When using GraphJin with MSSQL (SQL Server), certain column names are incorrectly mapped in the generated SQL. GraphJin appears to apply a camelCase transformation that strips underscores from some column names, producing SQL column names that don't match the actual database schema.
Environment
Reproduction
Given an MSSQL table
Theatre_Masterwith columns likeIs_Active,Is_DCI,property_id,Equipment_Type:Works correctly
{ theatre_master(limit: 3) { theater_id theater_name city ckt_id region_id } }These columns map correctly:
theater_id→Theater_Id✅theater_name→Theater_Name✅ckt_id→Ckt_Id✅region_id→Region_ID✅Broken columns
{ theatre_master(limit: 3) { is_active is_dci property_id equipment_type } }is_activeIsActiveIs_Activemssql: Invalid column name 'IsActive'is_dciIsDCIIs_DCImssql: Invalid column name 'IsDCI'property_idpropertyIdproperty_idmssql: Invalid column name 'propertyId'equipment_typeEquipment_Typefield 'equipment_type' is not a column or a functionThe same pattern occurs across multiple tables — any column with
is_prefix or a lowercaseword_wordpattern gets incorrectly camelCased.Expected behavior
GraphJin should use the exact column names as introspected from
INFORMATION_SCHEMA.COLUMNS(orsys.columns) when generating SQL for MSSQL. The camelCase transformation should not be applied to MSSQL column names since MSSQL schemas commonly use mixed naming conventions (PascalCase_With_Underscores,lowercase_with_underscores,Is_PascalCase).Config
Using auto-discovery (
tables: []) with no explicit column configuration:Workaround
Currently using
node-mssqlfor queries involving affected columns. Would prefer to use GraphJin for all reads.