'use strict';


const queryDatabase = async function () {
  return async function (input) {
    const { operation, args } = input;
    // Fake data for the moment
    let response;
    console.log(JSON.stringify(operation), JSON.stringify(args));
    if (operation.multiple) {
      response = await [
        { id: 1, weight: 1.5, isOverweight: false, name: 'Dog', photo_urls: ['http://dog.com/photo/1', 'http://dog.com/photo/2'], tags: ['adorable'], status: 'happy', attributes: { age: 10 }, best_friend_id: 1, friends_ids: [1, 2, 3] },
        { id: 2, weight: 2.5, isOverweight: true, name: 'Cat', photo_urls: ['http://cat.com/photo/1', 'http://cat.com/photo/2'], tags: ['even more adorable'], status: 'grumpy', attributes: { age: 12 }, best_friend_id: 1, friends_ids: [1, 2, 3] },
        { id: 3, weight: 3.5, isOverweight: true, name: 'Koala', photo_urls: ['http://koala.com/photo/1'], tags: ['suspended'], status: 'sleepy', attributes: { age: 14 }, best_friend_id: 1, friends_ids: [1, 2, 3] },
      ];
    } else {
      response = await { id: 1, weight: 1.5, isOverweight: false, name: 'Dog', photo_urls: ['http://dog.com/photo/1', 'http://dog.com/photo/2'], tags: ['adorable'], status: 'happy', attributes: { age: 10 }, best_friend_id: 1, friends_ids: [1, 2, 3] };
    }
    return response;
  };
};


module.exports = {
  queryDatabase,
};
@@ -490,35 +490,32 @@
 0 %7D, best_friend
-_id
 : 1, friends_ids
@@ -502,36 +502,32 @@
 iend: 1, friends
-_ids
 : %5B1, 2, 3%5D %7D,%0A 
@@ -730,35 +730,32 @@
 2 %7D, best_friend
-_id
 : 1, friends_ids
@@ -742,36 +742,32 @@
 iend: 1, friends
-_ids
 : %5B1, 2, 3%5D %7D,%0A 
@@ -939,35 +939,32 @@
 4 %7D, best_friend
-_id
 : 1, friends_ids
@@ -951,36 +951,32 @@
 iend: 1, friends
-_ids
 : %5B1, 2, 3%5D %7D,%0A 
@@ -1214,19 +1214,16 @@
 t_friend
-_id
 : 1, fri
@@ -1230,12 +1230,8 @@
 ends
-_ids
 : %5B1

Fix wrong data output