I’m attempting to utilize a single adapter with multiple models. To achieve this, I’ve created an adapter that extends DS.JSONAPIAdapter
. This adapter has its own namespace and has implemented Ember Data actions for querying data. Below is my model code:
import DS from ‘ember-data’;
import customAdapter from ‘…/adapters/custom-adapter’;
export default DS.Model.extend({
ATTR_1: DS.attr(),
ATTR_2: DS.attr(),
ATTR_3: DS.attr(),
ATTR_4: DS.attr(),
ATTR_5: DS.attr(),
}).reopenClass({
adapter: customAdapter
});
When querying data from the store using the aforementioned model, the request fails to engage the specified adapter. What could be the reason for this issue? Could you provide some insights or suggestions?