{"record":{"id":"fb8e2190c6c55cbe","repo":"hasura/graphql-engine","slug":"custom-type-s-is-not-present-in-s","errorCode":null,"errorMessage":"custom type %s is not present in %s","messagePattern":"custom type (.+?) is not present in (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/internal/metadataobject/actions/actions.go","lineNumber":433,"sourceCode":"\tfor customTypeIndex, customType := range oldAction.CustomTypes.Enums {\n\t\tvar isFound bool\n\n\t\tfor newTypeObjIndex, newTypeObj := range sdlFromResp.Types.Enums {\n\t\t\tif customType.Name == newTypeObj.Name {\n\t\t\t\tisFound = true\n\t\t\t\tsdlFromResp.Types.Enums[newTypeObjIndex].Description = oldAction.CustomTypes.Enums[customTypeIndex].Description\n\t\t\t\tsdlFromResp.Types.Enums[newTypeObjIndex].Relationships = oldAction.CustomTypes.Enums[customTypeIndex].Relationships\n\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif !isFound {\n\t\t\treturn nil, errors.E(\n\t\t\t\top,\n\t\t\t\terrors.KindBadInput,\n\t\t\t\ta.error(\n\t\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\t\"custom type %s is not present in %s\",\n\t\t\t\t\t\tcustomType.Name,\n\t\t\t\t\t\tgraphqlFileName,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t}\n\t}\n\n\tfor customTypeIndex, customType := range oldAction.CustomTypes.InputObjects {\n\t\tvar isFound bool\n\n\t\tfor newTypeObjIndex, newTypeObj := range sdlFromResp.Types.InputObjects {\n\t\t\tif customType.Name == newTypeObj.Name {\n\t\t\t\tisFound = true\n\t\t\t\tsdlFromResp.Types.InputObjects[newTypeObjIndex].Description = oldAction.CustomTypes.InputObjects[customTypeIndex].Description\n\t\t\t\tsdlFromResp.Types.InputObjects[newTypeObjIndex].Relationships = oldAction.CustomTypes.InputObjects[customTypeIndex].Relationships\n","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/internal/metadataobject/actions/actions.go#L415-L451","documentation":"Build fails when a custom enum type declared in the old actions metadata (custom_types.Enums) is not present in the generated GraphQL SDL file. The build validates that every custom type in metadata survives into the SDL produced by the CLI extension converter.","triggerScenarios":"Calling Build() after an enum listed under custom_types in metadata was removed or renamed in graphql.actions.graphql, or when the enum was never carried over during SDL generation.","commonSituations":"Renaming an enum in the .graphql file without updating metadata; deleting unused-looking enums from SDL that metadata still references; version drift between metadata format and generated SDL.","solutions":["Re-add the missing enum definition to graphql.actions.graphql with the exact name from the error message","Regenerate the SDL from metadata so all custom types are emitted","Delete the enum from metadata custom_types if it is truly obsolete"],"exampleFix":"# before: enum missing from graphql.actions.graphql\n\n# after:\nenum MyStatus {\n  ACTIVE\n  INACTIVE\n}","handlingStrategy":"validation","validationCode":"// Check each metadata enum name appears in the SDL before Build\nfunc enumsPresent(enums []string, sdl string) bool {\n  for _, e := range enums {\n    if !strings.Contains(sdl, \"enum \"+e) { return false }\n  }\n  return true\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Regenerate SDL from metadata rather than editing it","Review diffs of both files together"],"tags":["hasura","actions","custom-types","graphql-sdl"],"backgroundTag":"metadata-schema-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}