diff --git a/packages/plugins/graphql/server/services/builders/type.js b/packages/plugins/graphql/server/services/builders/type.js index 2396ced321..b0022118ab 100644 --- a/packages/plugins/graphql/server/services/builders/type.js +++ b/packages/plugins/graphql/server/services/builders/type.js @@ -275,10 +275,9 @@ module.exports = context => { isRelation, } = utils.attributes; - const { attributes, modelType, options = {} } = contentType; + const { attributes, modelType } = contentType; const attributesKey = Object.keys(attributes); - const hasTimestamps = isArray(options.timestamps); const name = (modelType === 'component' ? getComponentName : getTypeName).call( null, @@ -293,17 +292,7 @@ module.exports = context => { t.nonNull.id('id'); } - // 1. Timestamps - // If the content type has timestamps enabled - // then we should add the corresponding attributes in the definition - if (hasTimestamps) { - const [createdAtKey, updatedAtKey] = contentType.options.timestamps; - - t.nonNull.dateTime(createdAtKey); - t.nonNull.dateTime(updatedAtKey); - } - - /** 2. Attributes + /** Attributes * * Attributes can be of 7 different kind: * - Scalar