{"record":{"id":"efb7b32f0c5cd8e3","repo":"gatsbyjs/gatsby","slug":"can-t-determine-type-for-value-in-selector","errorCode":null,"errorMessage":"Can't determine type for \"${value}\" in `${selector}`.","messagePattern":"Can't determine type for \"(.+?)\" in `(.+?)`\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/schema/infer/add-inferred-fields.js","lineNumber":381,"sourceCode":"        const inferenceConfig = getInferenceConfig({\n          typeComposer: fieldTypeComposer,\n          defaults: config,\n        })\n\n        return {\n          type: addInferredFieldsImpl({\n            schemaComposer,\n            typeComposer: fieldTypeComposer,\n            exampleObject: value,\n            typeMapping,\n            prefix: selector,\n            unsanitizedFieldPath,\n            config: inferenceConfig,\n          }),\n        }\n      }\n  }\n  throw new Error(`Can't determine type for \"${value}\" in \\`${selector}\\`.`)\n}\n\nconst createTypeName = selector => {\n  const keys = selector.split(`.`)\n  const suffix = keys.slice(1).map(_.upperFirst).join(``)\n  return `${keys[0]}${suffix}`\n}\n\nconst NON_ALPHA_NUMERIC_EXPR = new RegExp(`[^a-zA-Z0-9_]`, `g`)\n\n/**\n * GraphQL field names must be a string and cannot contain anything other than\n * alphanumeric characters and `_`. They also can't start with `__` which is\n * reserved for internal fields (`___foo` doesn't work either).\n */\nconst createFieldName = key => {\n  // Check if the key is really a string otherwise GraphQL will throw.\n  invariant(","sourceCodeStart":363,"sourceCodeEnd":399,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/schema/infer/add-inferred-fields.js#L363-L399","documentation":"Terminal fallback of getSimpleFieldConfig: after trying object/array/field-type inference branches for an example value, no inference rule matched, so the field's type cannot be determined from the sampled data at that selector path. Usually an empty value or an exotic type (e.g. null-only, Date, mixed) in the source data.","triggerScenarios":"Thrown at packages/gatsby/src/schema/infer/add-inferred-fields.js:381 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the field consistently contains values of one primitive type","Add an explicit type definition (createTypes) for the field instead of relying on inference","Normalize nulls/undefined out of the example data"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}