{"record":{"id":"f668bbee225717f9","repo":"hasura/graphql-engine","slug":"relationship-mappings-from-value-expressions-are-n","errorCode":null,"errorMessage":"Relationship mappings from value expressions are not supported yet.","messagePattern":"Relationship mappings from value expressions are not supported yet\\.","errorType":"validation","errorClass":"RelationshipError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/object_relationships/error.rs","lineNumber":155,"sourceCode":"    ModelAggregateExpressionError {\n        type_name: Qualified<CustomTypeName>,\n        relationship_name: RelationshipName,\n        error: models::ModelsError, // ideally, this would return the more accurate\n                                    // `ModelAggregateExpressionError` instead\n    },\n    #[error(\n        \"The source field '{source_field_name}' of type '{source_field_type}' in the relationship '{relationship_name}' on type '{source_type}' cannot be mapped to the target argument '{target_argument_name}' of type '{target_argument_type}' on the target model '{target_model_name}' because their types are incompatible\"\n    )]\n    ModelArgumentTargetMappingTypeMismatch {\n        source_type: Qualified<CustomTypeName>,\n        relationship_name: RelationshipName,\n        source_field_name: FieldName,\n        source_field_type: QualifiedTypeReference,\n        target_model_name: Qualified<ModelName>,\n        target_argument_name: ArgumentName,\n        target_argument_type: QualifiedTypeReference,\n    },\n    #[error(\"Relationship mappings from value expressions are not supported yet.\")]\n    ValueExpressionMappingsNotSupportedYet,\n    #[error(\n        \"The field path provided in the {location:} of the relationship {relationship_name} on type {type_name} is empty\"\n    )]\n    EmptyFieldPath {\n        location: String,\n        relationship_name: RelationshipName,\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"Model fields cannot be used in command based relationship: {relationship_name:} on type {type_name:}\"\n    )]\n    ModelFieldCannotBeUsedInCommandRelationship {\n        relationship_name: RelationshipName,\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\"Relationships with nested field paths are not supported yet.\")]\n    NestedFieldPathsNotSupportedYet,","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/object_relationships/error.rs#L137-L173","documentation":"The relationship mapping used a literal/value expression as the mapping source instead of a field reference. Value-expression mappings are recognized by the parser but not yet implemented in the resolver, so any such mapping fails immediately.","triggerScenarios":"Writing a relationship mapping whose source is `{ value: ... }` / an inline literal expression rather than `{ field: ... }`.","commonSituations":"Trying to pass constants to command/model arguments via mappings on current engine versions.","solutions":["Replace the value expression with a mapping from an actual source field (add the field to the source type if needed)","Give the target argument a default value in the command/model metadata instead of mapping a constant","Wait for/upgrade to a version that supports value-expression mappings"],"exampleFix":"// before\nargument_mappings:\n  limit: { value: 10 }\n// after\n# add a field to the source type and map it:\nfields: [ ..., page_size ]\nargument_mappings:\n  limit: page_size","handlingStrategy":"validation","validationCode":"for (const v of Object.values(rel.argument_mappings ?? {})) {\n  if (typeof v === 'object' && v !== null && 'value' in v) {\n    throw new Error('value-expression mappings are not supported yet');\n  }\n}","typeGuard":null,"tryCatchPattern":"try { await applyMetadata(md); } catch (e) { if (/value expressions are not supported/.test(e.message)) { /* switch to field mapping or default */ } throw e; }","preventionTips":["Use command argument defaults instead of literal mappings on current versions","Watch release notes for value-expression mapping support"],"tags":["metadata","relationships","unsupported-feature","value-expression"],"backgroundTag":"unsupported-metadata-feature","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}