import EmberObject from '@ember/object';
import { resolve } from 'rsvp';

export default class ApplicationAdapter extends EmberObject {
  findRecord() {
    return resolve({
      data: {
        type: 'parent',
        id: '1',
        attributes: {
          name: 'John'
        },
        relationships: {
          children: {
            data: [
              { type: 'child', id: '1' },
              { type: 'child', id: '2' }
            ]
          }
        }
      },
      included: [
        {
          type: 'child',
          id: '1',
          attributes: {
            name: 'Chris'
          },
        },
        {
          type: 'child',
          id: '2',
          attributes: {
            name: 'Jim'
          },
        }
      ]
    });
  }
}