{"record":{"id":"7be85a01df00fad7","repo":"hasura/graphql-engine","slug":"the-filterinputfieldname-for-aggregate-needs-to-be","errorCode":null,"errorMessage":"the filterInputFieldName for aggregate needs to be defined in GraphqlConfig, when models have a selectAggregate graphql API","messagePattern":"the filterInputFieldName for aggregate needs to be defined in GraphqlConfig, when models have a selectAggregate graphql API","errorType":"validation","errorClass":"GraphqlConfigError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/graphql_config/error.rs","lineNumber":43,"sourceCode":"    )]\n    MissingOrderByInputFieldInGraphqlConfig,\n    #[error(\n        \"the orderByInput.enumTypeNames needs to be defined in GraphqlConfig, when models have orderByExpressionType\"\n    )]\n    MissingOrderByEnumTypeNamesInGraphqlConfig,\n    #[error(\n        \"only one enumTypeNames can be defined in GraphqlConfig, whose direction values are both 'asc' and 'desc'.\"\n    )]\n    MultipleOrderByEnumTypeNamesInGraphqlConfig,\n    #[error(\n        \"invalid directions: {directions} defined in orderByInput of GraphqlConfig , currently there is no support for partial directions. Please specify a type which has both 'asc' and 'desc' directions\"\n    )]\n    InvalidOrderByDirection { directions: String },\n    #[error(\n        \"the fieldName for argumentsInput needs to be defined in GraphqlConfig, when models have argumentsInputType\"\n    )]\n    MissingArgumentsInputFieldInGraphqlConfig,\n    #[error(\n        \"the filterInputFieldName for aggregate needs to be defined in GraphqlConfig, when models have a selectAggregate graphql API\"\n    )]\n    MissingAggregateFilterInputFieldNameInGraphqlConfig,\n    #[error(\"\\\"{name:}\\\" is not a valid GraphQL name.\")]\n    InvalidGraphQlName { name: String },\n    #[error(\"multiple graphql types found with the same name: {graphql_type_name:}\")]\n    ConflictingGraphQlType { graphql_type_name: ast::TypeName },\n}\n\nimpl ContextualError for GraphqlConfigError {\n    fn create_error_context(&self) -> Option<error_context::Context> {\n        None\n    }\n}\n","sourceCodeStart":25,"sourceCodeEnd":58,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/graphql_config/error.rs#L25-L58","documentation":"Thrown during metadata resolution when a model exposes a `selectAggregate` GraphQL API but the GraphqlConfig does not define `filterInputFieldName` for aggregates. The resolver needs this configured field name to build the aggregate filter input type, so metadata resolution aborts. It comes from the graphql_config stage of metadata-resolve in Hasura DDN v3 engine.","triggerScenarios":"A model in OpenDD metadata declares a selectAggregate command/GraphQL API while the subgraph's GraphqlConfig section is missing the aggregate filterInputFieldName setting (e.g. a custom graphql config object that overrides defaults without specifying it).","commonSituations":"Hand-editing open-dds.yaml / graphql config files, upgrading to a metadata version where aggregate configs must be explicit, or copy-pasting a GraphqlConfig block that omits the aggregate filter field name.","solutions":["Add filterInputFieldName for aggregates to your GraphqlConfig in the model's metadata (graphql_config) file","Regenerate the graphql config for the model with the CLI (ddn plugin or `ddn build`) so defaults are filled in","Verify the model actually intends to expose selectAggregate; if not, remove that API from the model"],"exampleFix":"# before\nkind: GraphqlConfig\nversion: v1\ndefinition: {}\n# model has selectAggregate: {}\n\n# after\nkind: GraphqlConfig\nversion: v1\ndefinition:\n  aggregate:\n    filterInputFieldName: filter\n  # ... plus required names for selectAggregate","handlingStrategy":"validation","validationCode":"# CI check before `ddn build`:\nimport yaml, sys\ncfg = yaml.safe_load(open('subgraph/graphql-config.yaml'))\nmodels = [yaml.safe_load(open(f)) for f in glob('subgraph/models/*.yaml')]\nhas_agg = any(m.get('definition',{}).get('selectAggregate',{}) is not None for m in models)\nagg_cfg = cfg.get('definition',{}).get('aggregate',{})\nif has_agg and 'filterInputFieldName' not in agg_cfg:\n    sys.exit('selectAggregate models require aggregate.filterInputFieldName')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always generate GraphqlConfig with `ddn build`/plugin rather than hand-writing it","Run metadata validation in CI on every metadata PR"],"tags":["hasura","ddn","graphql","metadata","aggregate","config"],"backgroundTag":"graphql-config-missing-field","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}