Handle undefined attributes in records resolver

This commit is contained in:
Prathamesh Musale 2024-10-22 17:04:37 +05:30
parent 139fb37bef
commit f8a7e32c78

View File

@ -46,7 +46,7 @@ export const createResolvers = config => {
wns_records: async (_, { attributes }) => {
log('WNS records...');
const {limit, offset, ...queryAttributes } = attributes;
const {limit, offset, ...queryAttributes } = attributes || {};
const data = await registry.queryRecords(queryAttributes, false, false, limit, offset);
return {