{"record":{"id":"765f1c6268b476e7","repo":"hasura/graphql-engine","slug":"the-target-data-connector-data-connector-name-fo","errorCode":null,"errorMessage":"The target data connector {data_connector_name} for relationship {relationship_name} on type {type_name} does not support the variables capability","messagePattern":"The target data connector (.+?) for relationship (.+?) on type (.+?) does not support the variables capability","errorType":"validation","errorClass":"RelationshipError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/object_relationships/error.rs","lineNumber":111,"sourceCode":"    },\n    #[error(\n        \"The target argument {argument_name} of command {command_name} has been mapped more than once in the relationship {relationship_name} on type {type_name}\"\n    )]\n    CommandArgumentMappingExistsInRelationship {\n        argument_name: ArgumentName,\n        command_name: Qualified<CommandName>,\n        relationship_name: RelationshipName,\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"No mapping for target command argument {argument_name} in the relationship {relationship_name} on type {type_name}\"\n    )]\n    MissingArgumentMappingInRelationship {\n        type_name: Qualified<CustomTypeName>,\n        argument_name: ArgumentName,\n        relationship_name: RelationshipName,\n    },\n    #[error(\n        \"The target data connector {data_connector_name} for relationship {relationship_name} on type {type_name} does not support the variables capability\"\n    )]\n    RelationshipTargetDoesNotSupportForEach {\n        type_name: Qualified<CustomTypeName>,\n        relationship_name: RelationshipName,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n    #[error(\n        \"The target data connector {data_connector_name} for relationship {relationship_name} on type {type_name} has not defined any capabilities\"\n    )]\n    NoRelationshipCapabilitiesDefined {\n        type_name: Qualified<CustomTypeName>,\n        relationship_name: RelationshipName,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n    #[error(\n        \"The relationship {relationship_name} on type {type_name} defines an aggregate, but aggregates can only be used with array relationships, not object relationships\"\n    )]","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/object_relationships/error.rs#L93-L129","documentation":"The relationship uses a foreach/variables-style mapping, but the data connector backing the target model does not support the `variables` capability, so the mapping cannot be pushed down to the connector.","triggerScenarios":"Defining a foreach relationship (argument mappings over a list, i.e. nested/variables semantics) whose target model uses a data connector that lacks the variables capability.","commonSituations":"Using a custom or lightweight connector (e.g. a REST/GraphQL proxy connector) that never implemented variables; targeting a new connector without checking its capabilities response.","solutions":["Switch the target model to a data connector that supports the variables capability (e.g. a native database connector)","Remove the foreach/variables-based mapping and use plain field mappings instead","If you own the connector, implement and advertise the variables capability in its capabilities response"],"exampleFix":"// before\nrelationships:\n  articles:\n    target: { model: articles, connector: rest_connector }\n    foreach_mapping: ...  # requires variables capability\n// after\nrelationships:\n  articles:\n    target: { model: articles, connector: postgres }\n    argument_mappings:\n      author_id: id","handlingStrategy":"validation","validationCode":"const caps = connectors[connectorName].capabilities ?? {};\nif (rel.foreach_mapping && !caps.variables) {\n  throw new Error(`connector ${connectorName} lacks variables capability`);\n}","typeGuard":null,"tryCatchPattern":"try { await applyMetadata(md); } catch (e) { if (/does not support the variables capability/.test(e.message)) { /* retarget connector or drop foreach */ } throw e; }","preventionTips":["Check a connector's capabilities before authoring foreach relationships against it","Prefer native DB connectors for variable-heavy mappings"],"tags":["metadata","relationships","data-connector","capabilities","foreach"],"backgroundTag":"connector-capability-not-supported","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}