{"record":{"id":"17b15f12a98438b9","repo":"hasura/graphql-engine","slug":"a-graphql-field-name-conflict-exists-between-the","errorCode":null,"errorMessage":"a GraphQL field name conflict exists between the '{name}' {name_source_1} and the '{name}' {name_source_2}. One of these will need to be renamed.","messagePattern":"a GraphQL field name conflict exists between the '(.+?)' (.+?) and the '(.+?)' (.+?)\\. One of these will need to be renamed\\.","errorType":"validation","errorClass":"AggregateBooleanExpressionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs","lineNumber":367,"sourceCode":"        relationship_name: open_dds::relationships::RelationshipName,\n        relationship_target_object_type: Qualified<CustomTypeName>,\n        boolean_expression_type: Qualified<CustomTypeName>,\n        boolean_expression_operand_type: Qualified<CustomTypeName>,\n    },\n\n    #[error(\"the filter input model '{model_name}' cannot be found\")]\n    FilterInputModelNotFound { model_name: Qualified<ModelName> },\n\n    #[error(\n        \"the operand type '{operand_type}' does not match the type of the model '{model_name}': '{model_type}'\"\n    )]\n    FilterInputModelTypeMismatch {\n        operand_type: Qualified<CustomTypeName>,\n        model_name: Qualified<ModelName>,\n        model_type: Qualified<CustomTypeName>,\n    },\n\n    #[error(\n        \"a GraphQL field name conflict exists between the '{name}' {name_source_1} and the '{name}' {name_source_2}. One of these will need to be renamed.\"\n    )]\n    GraphqlNameConflict {\n        name: String,\n        name_source_1: NameSource,\n        name_source_2: NameSource,\n    },\n}\n\n#[derive(Debug, Eq, PartialEq, Copy, Clone, derive_more::with_trait::Display)]\npub enum AggregateOperandType {\n    #[display(\"object aggregate\")]\n    ObjectAggregate,\n    #[display(\"scalar aggregate\")]\n    ScalarAggregate,\n}\n\n#[derive(Debug, Eq, PartialEq, Copy, Clone, derive_more::with_trait::Display)]","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs#L349-L385","documentation":"Two distinct metadata constructs would generate GraphQL fields with the same name in the same boolean expression / aggregate filter input type, producing an invalid schema. The error identifies both name sources; one must be renamed because GraphQL does not allow duplicate field names within a type.","triggerScenarios":"Configuring a logical operator field name, count aggregation field name, or operand field name in the GraphqlConfig that collides with another operand's GraphQL name (e.g. naming the _and logical operator the same as an operand field, or two aggregations mapping to the same field name).","commonSituations":"Customizing query.filterInputConfig or query.aggregate names to friendly names that clash with existing field names; adding a new operand whose GraphQL name matches a configured count/logical field; multiple aggregate expressions sharing graphql_name.","solutions":["Rename one of the two sources listed in the error (the field name mapping for the operand, or the logical operator / count aggregation name in GraphqlConfig).","If the collision comes from filterInputConfig, pick operator names like _and/_or/_not that do not collide with operand names.","If the collision is between aggregate field names, give each aggregation a distinct graphql_name."],"exampleFix":"# before\nquery:\n  filterInputConfig:\n    logical_operator_names:\n      and: name   # collides with operand field 'name'\n# after\nquery:\n  filterInputConfig:\n    logical_operator_names:\n      and: _and","handlingStrategy":"validation","validationCode":"fn assert_no_name_conflicts(bool_exp: &BooleanExpressionType, config: &GraphqlConfig) {\n    let mut seen: HashMap<String, NameSource> = HashMap::new();\n    let entries = configured_field_names(bool_exp, config); // (graphql_name, NameSource)\n    for (name, source) in entries {\n        if let Some(prev) = seen.insert(name.clone(), source.clone()) {\n            panic!(\"GraphQL field name conflict: {} ({:?} vs {:?})\", name, prev, source);\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep logical operator names prefixed with _ to avoid operand collisions.","Add a lint that checks all generated GraphQL field names within a type are unique."],"tags":["graphql","name-conflict","schema-generation","metadata"],"backgroundTag":"graphql-name-conflict","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}