{"record":{"id":"4077828090ab5d0d","repo":"hasura/graphql-engine","slug":"the-model-model-name-has-defined-a-selectaggrega","errorCode":null,"errorMessage":"the model {model_name} has defined a selectAggregate graphql API, but it will not appear in the GraphQL API unless query.aggregate.filterInputFieldName is also configured in GraphqlConfig","messagePattern":"the model (.+?) has defined a selectAggregate graphql API, but it will not appear in the GraphQL API unless query\\.aggregate\\.filterInputFieldName is also configured in GraphqlConfig","errorType":"validation","errorClass":"ModelGraphqlIssue","httpStatus":null,"severity":"warning","filePath":"v3/crates/metadata-resolve/src/stages/models_graphql/types.rs","lineNumber":137,"sourceCode":"pub struct OffsetFieldGraphqlConfig {\n    pub field_name: ast::Name,\n}\n\n#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Default)]\npub struct ModelGraphQlApi {\n    pub arguments_input_config: Option<ModelGraphqlApiArgumentsConfig>,\n    pub select_uniques: Vec<SelectUniqueGraphQlDefinition>,\n    pub select_many: Option<SelectManyGraphQlDefinition>,\n    pub select_aggregate: Option<SelectAggregateGraphQlDefinition>,\n    pub order_by_expression: Option<ModelOrderByExpression>,\n    pub limit_field: Option<LimitFieldGraphqlConfig>,\n    pub offset_field: Option<OffsetFieldGraphqlConfig>,\n    pub filter_input_type_name: Option<ast::TypeName>,\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum ModelGraphqlIssue {\n    #[error(\n        \"the model {model_name} has defined a selectAggregate graphql API, but it will not appear in the GraphQL API unless query.aggregate.filterInputFieldName is also configured in GraphqlConfig\"\n    )]\n    MissingAggregateFilterInputFieldNameInGraphqlConfig { model_name: Qualified<ModelName> },\n\n    #[error(\"the model {model_name} has a duplicate root field in the GraphQL schema: {error:}\")]\n    DuplicateRootField {\n        model_name: Qualified<ModelName>,\n        error: DuplicateRootFieldError,\n    },\n\n    #[error(\n        \"model arguments graphql input configuration has been specified for model {model_name:} that does not have arguments\"\n    )]\n    UnnecessaryModelArgumentsGraphQlInputConfiguration { model_name: Qualified<ModelName> },\n    #[error(\n        \"an unnecessary filter input type name graphql configuration has been specified for model {model_name:} that does not use aggregates\"\n    )]\n    UnnecessaryFilterInputTypeNameGraphqlConfiguration { model_name: Qualified<ModelName> },","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/models_graphql/types.rs#L119-L155","documentation":"A model declares a selectAggregate GraphQL API, but query.aggregate.filterInputFieldName is not configured in GraphqlConfig, so the aggregate API silently won't appear in the GraphQL schema. This is an issue/warning, not a hard failure.","triggerScenarios":"Enabling selectAggregate on a model while the GraphQL config lacks the filterInputFieldName under query.aggregate.","commonSituations":"Partial aggregate configuration where developers expect an aggregate root field but it never shows up in the schema.","solutions":["Add query.aggregate.filterInputFieldName to the model's GraphQL config","Or remove selectAggregate if aggregates are not intended"],"exampleFix":"# before\ngraphql:\n  select_aggregate: {}\n# after\ngraphql:\n  select_aggregate:\n    query:\n      aggregate:\n        filter_input_field_name: where\n","handlingStrategy":"validation","validationCode":"if model.select_aggregate.is_some() {\n    warn_if!(graphql_config.query.aggregate.filter_input_field_name.is_none());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat missing filterInputFieldName as a config smell even though it only warns"],"tags":["hasura","graphql","aggregates","configuration","warning"],"backgroundTag":"missing-graphql-configuration","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}