Q:

Create a new method on the store?

Me and my colleague is building an application that has two different api-endpoints which it talks to. Unfortunately it sometimes needs to do multiple requests to both the endpoints and mash the answer together into one big data structure.
So far, we have done it by overriding the query-method in the ApplicationAdapter but has encountered an issue with this since we sometimes require just a single request to be made.
We now want to be able to add a new method to the store so instead of:
this.get('store').query(somemodel, params);

We want to be able to do:
this.get('store').multipleQuery(somemodel, params);

In the adapter, creating a new method is easy as we can simply just add it. But how do we create a new method on the store and how can we make sure the Adapter uses our extended class?

A:

Well, the store is just a service so you can override and extend it:
services/store.js
import DS from 'ember-data';

export default DS.Store.extend({
  multipleQuery() {...}
});

But you have to understand, the adapter does not use the store, the store is using the adapter(s).
Also start to know that you would need to use private APIs. I would read the code to learn how the store works.
But I think you should just use the adapter. Why not just do store.query('model', {multiple:true}) or something like that?

