We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a03e862 commit a3ad6d7Copy full SHA for a3ad6d7
packages/gatsby-source-contentful/src/gatsby-node.js
@@ -346,7 +346,15 @@ exports.sourceNodes = async (
346
347
const gqlTypes = contentTypeItems.map(contentTypeItem =>
348
schema.buildObjectType({
349
- name: _.upperFirst(_.camelCase(`Contentful ${contentTypeItem.name}`)),
+ name: _.upperFirst(
350
+ _.camelCase(
351
+ `Contentful ${
352
+ pluginConfig.get(`useNameForId`)
353
+ ? contentTypeItem.name
354
+ : contentTypeItem.sys.id
355
+ }`
356
+ )
357
+ ),
358
fields: {
359
contentful_id: { type: `String!` },
360
id: { type: `ID!` },
0 commit comments