@Convly Can you go into more detail on this line? I need some help.
Transforming data:
return toEntityResponse(data, { args, resourceUID: 'api::customer-profile.customer-profile' });
In my situation I have a collection type “Subscription” and I’m overwriting the createSubscription resolver. The mutation works and I get “data” back after I make the request, but I want to include a “session url” as well (I’m integrating Stripe).
This is what I have:
// above this I have pretty much what djourney has
const data = await strapi.entityService.create('api::subscription.subscription', args);
args.session_url = session.url; // I also tried swapping these 2 lines ^
return toEntityResponse(data, { args, resourceUID: 'api::subscription.subscription' });
In short, my data isn’t being transformed and I’m not sure how the “args” play in or if it’s the right approach to update the args directly like that. My goal is just to get back that session url so I can kick off the Stripe checkout process.