diff --git a/packages/strapi-plugin-graphql/services/GraphQL.js b/packages/strapi-plugin-graphql/services/GraphQL.js index b691438674..704fc3ec07 100644 --- a/packages/strapi-plugin-graphql/services/GraphQL.js +++ b/packages/strapi-plugin-graphql/services/GraphQL.js @@ -486,7 +486,7 @@ module.exports = { // Detect enum and generate it for the schema definition const enums = Object.keys(model.attributes) - .filter(definition => definition.type === 'enumeration') + .filter(attribute => model.attributes[attribute].type === 'enumeration') .map((attribute) => { const definition = model.attributes[attribute];