{"record":{"id":"54ffc941ad3b4475","repo":"hasura/graphql-engine","slug":"relationship-name-is-either-remote-or-not-havi","errorCode":null,"errorMessage":"Relationship '{name}' is either remote or not having 'relation_comparisons' NDC capability; not supported for filtering","messagePattern":"Relationship '(.+?)' is either remote or not having 'relation_comparisons' NDC capability; not supported for filtering","errorType":"exception","errorClass":"FieldError","httpStatus":null,"severity":"error","filePath":"v3/crates/execute/src/error.rs","lineNumber":44,"sourceCode":"#[derive(Error, Debug, Transitive)]\n#[transitive(from(json::Error, FieldInternalError))]\n#[transitive(from(NDCUnexpectedError, FieldInternalError))]\n#[transitive(from(gql::normalized_ast::Error, FieldInternalError))]\n#[transitive(from(gql::introspection::Error, FieldInternalError))]\n#[transitive(from(FilterPredicateError, FieldInternalError))]\npub enum FieldError {\n    #[error(\"error from data source: {}\", connector_error.error_response.message())]\n    NDCExpected {\n        connector_error: ndc_client::ConnectorError,\n    },\n\n    #[error(\"field '{field_name:} not found in _Service\")]\n    FieldNotFoundInService { field_name: String },\n\n    #[error(\"subscription are not supported over HTTP\")]\n    SubscriptionsNotSupported,\n\n    #[error(\n        \"Relationship '{name}' is either remote or not having 'relation_comparisons' NDC capability; not supported for filtering\"\n    )]\n    RelationshipPredicatesNotSupported { name: RelationshipName },\n\n    #[error(\"internal error: {0}\")]\n    InternalError(#[from] FieldInternalError),\n}\n\nimpl FieldError {\n    fn get_details(&self) -> Option<serde_json::Value> {\n        match self {\n            Self::NDCExpected { connector_error } => {\n                Some(connector_error.error_response.details().clone())\n            }\n            Self::InternalError(internal) => internal.get_details(),\n            Self::FieldNotFoundInService { .. }\n            | Self::SubscriptionsNotSupported\n            | Self::RelationshipPredicatesNotSupported { .. } => None,","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/execute/src/error.rs#L26-L62","documentation":"FieldError::RelationshipPredicatesNotSupported — a query used relationship predicates (filtering through a relationship, requiring the NDC 'relation_comparisons' capability), but the named relationship is either a remote relationship or its connector lacks that capability, so the filter cannot be pushed down.","triggerScenarios":"Filtering on a relationship, e.g. query { articles(where: {author: {name: {_eq: \"X\"}}}) }, where 'author' is a remote relationship or the target connector doesn't advertise relation_comparisons in its capabilities response.","commonSituations":"Metadata models relationships as remote across services, connector version too old to support relation comparisons, or capability flags not refreshed after connector upgrade.","solutions":["Rewrite the query to fetch the related entity first and filter client-side, or use two queries","If the relationship is local, upgrade the NDC connector to a version supporting relation_comparisons","Re-fetch/refresh connector capabilities in metadata after upgrading","Model the relationship as local (same connector) if the data can be co-located"],"exampleFix":"# before\nquery { articles(where: {author: {name: {_eq: \"Ada\"}}}) { id } }\n\n# after\nquery { authors(where: {name: {_eq: \"Ada\"}}) { articles { id } } }","handlingStrategy":"fallback","validationCode":"null","typeGuard":"fn uses_remote_relationship(filter: &Filter) -> bool { /* walk filter tree for relationship predicate targets */ true }","tryCatchPattern":"Match FieldError::RelationshipPredicatesNotSupported { name } and either rewrite the query to avoid relationship filtering or surface a clear 'capability not supported for relationship X' error.","preventionTips":["Check connector capabilities for relation_comparisons before using relationship filters","Prefer local relationships for filterable joins","Keep metadata capabilities refreshed after connector upgrades"],"tags":["ndc","relationships","filtering","capabilities","rust"],"backgroundTag":"relationship-filter-unsupported","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}