{"record":{"id":"7e3f89d7a4de95b8","repo":"gatsbyjs/gatsby","slug":"multiple-node-fields-resolve-to-the-same-graphql-f","errorCode":null,"errorMessage":"Multiple node fields resolve to the same GraphQL field `${prefix}.${field.key}` - [${possibleFieldsNames}]. Gatsby will use `${field.unsanitizedKey}`.","messagePattern":"Multiple node fields resolve to the same GraphQL field `(.+?)\\.(.+?)` - \\[(.+?)\\]\\. Gatsby will use `(.+?)`\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/schema/infer/add-inferred-fields.js","lineNumber":79,"sourceCode":"    const key = createFieldName(unsanitizedKey)\n    fields.push({\n      key,\n      unsanitizedKey,\n      exampleValue: exampleObject[unsanitizedKey],\n    })\n  })\n\n  const fieldsByKey = _.groupBy(fields, field => field.key)\n\n  Object.keys(fieldsByKey).forEach(key => {\n    const possibleFields = fieldsByKey[key]\n    let selectedField\n    if (possibleFields.length > 1) {\n      const field = resolveMultipleFields(possibleFields)\n      const possibleFieldsNames = possibleFields\n        .map(field => `\\`${field.unsanitizedKey}\\``)\n        .join(`, `)\n      report.warn(\n        `Multiple node fields resolve to the same GraphQL field \\`${prefix}.${field.key}\\` - [${possibleFieldsNames}]. Gatsby will use \\`${field.unsanitizedKey}\\`.`\n      )\n      selectedField = field\n    } else {\n      selectedField = possibleFields[0]\n    }\n\n    const fieldConfig = getFieldConfig({\n      ...selectedField,\n      schemaComposer,\n      typeComposer,\n      prefix,\n      unsanitizedFieldPath,\n      typeMapping,\n      config,\n    })\n\n    if (!fieldConfig) return","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/schema/infer/add-inferred-fields.js#L61-L97","documentation":"During schema inference (addInferredFieldsImpl), multiple node fields map to the same sanitized GraphQL field name (e.g. `someField` and `some_field` both become someField). Gatsby picks one representative value via resolveMultipleFields, warns which candidates existed and which unsanitized key was chosen, and proceeds — the other fields' values may be unrepresented in the schema.","triggerScenarios":"Thrown at packages/gatsby/src/schema/infer/add-inferred-fields.js:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename conflicting source fields so they sanitize to distinct GraphQL names","Add explicit field inference (@infer/@dontInfer or explicit type definitions in createSchemaCustomization) to control resolution","Normalize source data keys (e.g. camelCase everything) in the source plugin"],"exampleFix":null,"handlingStrategy":"fallback","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"}