{"record":{"id":"cf02eef8ce0012a0","repo":"hasura/graphql-engine","slug":"version-check-w","errorCode":null,"errorMessage":"version check: %w","messagePattern":"version check: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/cli.go","lineNumber":720,"sourceCode":"\t\tec.Logger.Error(\"connecting to graphql-engine server failed\")\n\t\tec.Logger.Info(\"possible reasons:\")\n\t\tec.Logger.Info(\n\t\t\t\"1) Provided root endpoint of graphql-engine server is wrong. Verify endpoint key in config.yaml or/and value of --endpoint flag\",\n\t\t)\n\t\tec.Logger.Info(\n\t\t\t\"2) Endpoint should NOT be your GraphQL API, ie endpoint is NOT https://hasura-cloud-app.io/v1/graphql it should be: https://hasura-cloud-app.io\",\n\t\t)\n\t\tec.Logger.Info(\"3) Server might be unhealthy and is not running/accepting API requests\")\n\t\tec.Logger.Info(\"4) Admin secret is not correct/set\")\n\t\tec.Logger.Infoln()\n\n\t\treturn errors.E(op, err)\n\t}\n\n\t// get version from the server and match with the cli version\n\terr = ec.checkServerVersion()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"version check: %w\", err))\n\t}\n\n\t// get the server feature flags\n\terr = ec.Version.GetServerFeatureFlags()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"error in getting server feature flags %w\", err))\n\t}\n\n\tec.AddRequestHeaders(\n\t\tmap[string]string{GetAdminSecretHeaderName(ec.Version): ec.Config.GetAdminSecret()},\n\t)\n\n\tec.Config.HTTPClient.SetHeaders(ec.requestHeaders)\n\n\t// this populates the ec.Config.ServerConfig.HasuraServerInternalConfig\n\terr = ec.Config.GetHasuraInternalServerConfig(httpClient)\n\tif err != nil {\n\t\t// If config API is not enabled log it and don't fail","sourceCodeStart":702,"sourceCodeEnd":738,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/cli.go#L702-L738","documentation":"A value used inside a boolean expression failed type checking against the field's expected type. This wraps the underlying typecheck::TypecheckError, so the actual mismatch details (expected vs provided type) are in the inner error.","triggerScenarios":"Passing a literal of the wrong shape/type in a filter value — e.g. a string where an Int is expected, a malformed UUID/datetime literal, or a JSON value not matching the comparison expression schema for the field's type.","commonSituations":"Client-generated filter literals with wrong JSON types; datetime/UUID formats not matching the configured format; enum values passed as raw strings when the expression type expects a specific representation.","solutions":["Inspect the inner TypecheckError for expected vs actual type","Coerce the literal to the field's declared type (and its format) before sending","Validate filter payloads against the boolean expression schema before executing","Check custom scalar formats (e.g. 'ISO8601') and serialize values accordingly"],"exampleFix":"# before\nwhere: { published_at: { _gt: 1700000000 } }\n# after\nwhere: { published_at: { _gt: \"2023-11-14T22:13:20Z\" } }","handlingStrategy":"validation","validationCode":"// Validate literal shape against the field type before sending\nconst ok = checkLiteral(fieldType, where[fieldName][op]);\nif (!ok) throw new Error(`Invalid literal for ${fieldType.name}`);","typeGuard":"function isValidLiteral(type, v) { switch (type) { case 'Int': return Number.isInteger(v); case 'String': return typeof v === 'string'; default: return true; } }","tryCatchPattern":"try { execute(); } catch (e) { if (e?.code === 'ValueTypecheckError') coerceAndRetry(e.inner.expected, e.inner.actual); else throw e; }","preventionTips":["Serialize filter literals per scalar format (ISO8601 dates, canonical UUIDs)","Use generated client types for boolean expression inputs"],"tags":["typecheck","boolean-expression","filtering","value-validation"],"backgroundTag":"type-validation-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}