i have below resolver
track: (_, {name}, {dataSources}) => {
return dataSources.trackAPI.postMovie(name);
},
trying to call datasource with name varible but API is not taking the value coming from schema.
at backend API always same value populating.
class TrackAPI extends RESTDataSource {
baseURL = “https://abc.com/”;
// POST
async postMovie(assetname) {
return this.post(
list/assets
, // path
{ body:{
“name”: “$(assetname)”
}},
);
}