lore-hook-models

Creates a Model for each model in the application

Overview

If you're only consuming data from a single API, you'll never need to modify this file. But once you start consuming data from multiple APIs, you'll need to tell Lore which models are associated with each connection.

If your application interacts with multiple APIs, create a connection for each API and then define which models are associated with each connection here.

module.exports = {

  defaultConnection: 'default'

  connectionModelMap: {
    default: [],
    v1: [
      'currentUser',
      'author'
    ],
    v2: [
      'book',
      'publisher'
    ]
  }

};

In the example above, the models currentUser and author use the v1 connection, while the book and publisher models use the v2 connection. All other models use the default connection.