{"record":{"id":"5b24317b8ab68909","repo":"hasura/graphql-engine","slug":"model-model-name-with-arguments-is-unsupported-5b2431","errorCode":null,"errorMessage":"model {model_name:} with arguments is unsupported as a global ID source","messagePattern":"model (.+?) with arguments is unsupported as a global ID source","errorType":"validation","errorClass":"RelayError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/relay/mod.rs","lineNumber":47,"sourceCode":"    GlobalIdSourceNotDefined {\n        object_type: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"Model {model_name:} is marked as a global ID source but there are no global id fields present in the related object type {type_name:}\"\n    )]\n    NoGlobalFieldsPresentInGlobalIdSource {\n        type_name: Qualified<CustomTypeName>,\n        model_name: ModelName,\n    },\n    #[error(\n        \"Found multiple models  {model_1:}, {model_2:} that implement the same object type {object_type:} to be global ID sources.\"\n    )]\n    DuplicateModelGlobalIdSource {\n        model_1: Qualified<ModelName>,\n        model_2: Qualified<ModelName>,\n        object_type: Qualified<CustomTypeName>,\n    },\n    #[error(\"model {model_name:} with arguments is unsupported as a global ID source\")]\n    ModelWithArgumentsAsGlobalIdSource { model_name: Qualified<ModelName> },\n}\n","sourceCodeStart":29,"sourceCodeEnd":50,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/relay/mod.rs#L29-L50","documentation":"Relay stage error: a model marked globalIdSource: true declares arguments (e.g. a custom select with mandatory arguments). Argumented models cannot serve as deterministic Relay global ID sources, so resolution rejects the combination.","triggerScenarios":"Setting globalIdSource: true on a model whose definition includes command arguments (modelWithArguments), such as a filtered or parameterized select model.","commonSituations":"Reusing an argument-driven model (e.g. 'usersByTenant') as a Relay node source; adding arguments to an existing global-ID model during feature work.","solutions":["Remove the arguments from the model, or point globalIdSource at an argument-free model for the same type","If arguments are required, drop globalIdSource from this model and remove globalIdFields from the type (if no other source exists)","Split into two models: a plain one as global ID source and the argumented one for queries"],"exampleFix":"# before\nkind: Model\nname: UsersByTenant\nobjectType: User\nglobalIdSource: true\narguments:\n  tenantId: { type: String! }\n# after\nkind: Model\nname: Users\nobjectType: User\nglobalIdSource: true\n---\nkind: Model\nname: UsersByTenant\nobjectType: User\narguments:\n  tenantId: { type: String! }","handlingStrategy":"validation","validationCode":"fn check_global_id_model_has_no_args(models: &[Model]) -> Result<(), String> {\n    for m in models {\n        if m.global_id_source && !m.arguments.is_empty() {\n            return Err(format!(\"model {} has arguments; cannot be globalIdSource\", m.name));\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match ModelWithArgumentsAsGlobalIdSource and suggest moving the flag to an argument-free model","preventionTips":["Keep a plain unparameterized model per object type as the Relay node source","Re-check this invariant whenever adding arguments to models"],"tags":["relay","global-id","model-arguments","metadata","hasura-ddn"],"backgroundTag":"relay-global-id-misconfiguration","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}