diff --git a/backend/src/schema/resolvers/notifications.js b/backend/src/schema/resolvers/notifications.js index 8fe45bde3..93feb3781 100644 --- a/backend/src/schema/resolvers/notifications.js +++ b/backend/src/schema/resolvers/notifications.js @@ -40,8 +40,8 @@ export default { default: orderByClause = '' } - const offset = args.offset ? `SKIP ${args.offset}` : '' - const limit = args.first ? `LIMIT ${args.first}` : '' + const offset = args.offset && typeof args.offset === 'number' ? `SKIP ${args.offset}` : '' + const limit = args.first && typeof args.first === 'number' ? `LIMIT ${args.first}` : '' try { const cypher = ` MATCH (resource {deleted: false, disabled: false})-[notification:NOTIFIED]->(user:User {id:$id})