Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = schemaDef => {
const validated = validateSchema(schemaDef.types).getTypes()
const validation = groupProblems(validated)
const hasErrors = validation.some(group => group.problems.some(isError))
let types = []
if (!hasErrors) {
types = [
...schemaDef.types,
assetSourceData,
slug,
geopoint,
legacyRichDate,
imageAsset,
fileAsset,
imageCrop,
imageHotspot,