{"record":{"id":"3f97a3380a4a5596","repo":"hasura/graphql-engine","slug":"loading-env-file-failed-w","errorCode":null,"errorMessage":"loading .env file failed: %w","messagePattern":"loading \\.env file failed: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/cli.go","lineNumber":663,"sourceCode":"\n\treturn nil\n}\n\n// Validate prepares the ExecutionContext ec and then validates the\n// ExecutionDirectory to see if all the required files and directories are in\n// place.\nfunc (ec *ExecutionContext) Validate() error {\n\tvar op errors.Op = \"cli.ExecutionContext.Validate\"\n\t// validate execution directory\n\terr := ec.validateDirectory()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"validating current directory failed: %w\", err))\n\t}\n\n\t// load .env file\n\terr = ec.loadEnvfile()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"loading .env file failed: %w\", err))\n\t}\n\n\t// set names of config file\n\tec.ConfigFile = filepath.Join(ec.ExecutionDirectory, \"config.yaml\")\n\n\t// read config and parse the values into Config\n\terr = ec.readConfig()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"cannot read config: %w\", err))\n\t}\n\n\t// initialize HTTP client\n\t// CLI uses a common http client defined in internal/httpc.Client\n\t// get TLS Config\n\ttlsConfig, err := httpc.GenerateTLSConfig(ec.Config.CAPath, ec.Config.InsecureSkipTLSVerify)\n\tif err != nil || tlsConfig == nil {\n\t\treturn errors.E(op, stderrors.New(\"error while getting TLS config\"))\n\t}","sourceCodeStart":645,"sourceCodeEnd":681,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/cli.go#L645-L681","documentation":"A filter predicate requires an equality comparison against a source column (e.g. for relationship join conditions), but the data connector does not provide an equality operator for that column. Relationship joins and some optimizations rely on equality being available for the mapped column.","triggerScenarios":"Defining a relationship whose source/target columns use a type with no equality operator in the connector (e.g. a JSON column in a connector that doesn't support equality on JSON); filtering across a relationship whose argument column type lacks _eq.","commonSituations":"Relationships on exotic column types (JSONB, arrays, geo types); custom connectors that omit equality operators for certain types; filtering relationship arguments on unsupported types.","solutions":["Change the relationship to use columns of a type that supports equality in the connector","Register an equality operator for that column's type in the data connector","Expose the comparison via a command instead of a relationship-based filter","Verify the relationship argument mapping references the intended (comparable) column"],"exampleFix":"# before: relationship on jsonb column 'metadata'\n# after: relationship on uuid primary key 'id'\nargument_mapping: { id: id }","handlingStrategy":"validation","validationCode":"// Before defining relationship filters, confirm _eq exists for column types\nfor (const col of relationshipColumns) {\n  if (!connectorHasEquality(col.type)) throw new Error(`No equality operator for ${col.name}`);\n}","typeGuard":"const connectorHasEquality = (typeName) => !!caps.operators?._eq && caps.operators._eq.operand_type === typeName;","tryCatchPattern":"try { resolvePredicate(); } catch (e) { if (e?.code === 'MissingEqualOperator') rekeyRelationshipOnPk(); else throw e; }","preventionTips":["Define relationships on primary-key/foreign-key columns of comparable types","Avoid JSON/array columns as relationship join keys"],"tags":["relationship","equality-operator","data-connector","filtering"],"backgroundTag":"missing-equality-operator","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}