generateCustomerToken api has customQuery param missing in the latest version
We have upgraded a project to the latest version of the magento-api and it has broken some of our functionality.
On investigation, it appears that the CustomQuery parameter has been removed from the generateCustomerToken api.
https://github.com/vuestorefront/magento2/blob/main/packages/api-client/src/api/generateCustomerToken/index.ts
Is there a reason this has been removed or was it an error (perhaps made when customHeaders was added)?
GitHub
magento2/packages/api-client/src/api/generateCustomerToken/index.ts...
Vue Storefront 2 integration for Magento 2. Contribute to vuestorefront/magento2 development by creating an account on GitHub.
17 Replies
Hi @.darrenr π , I'll ask our engineers. I'm not sure.
Hi @.rohrig thanks for looking into this. Iβm pretty sure it should still be there, but will await your feedback.
Hey @rohrig Any updates on this?
Not yet, I'll bring it up in the daily and try to get an answer.
@rohrig Thanks.
Hi @Darren R π , Here's the answer I got.
generateCustomerToken
mutation returns nothing more but the token so our endpoint covers 100% of this method and there is no need for a custom query as you canβt effectively change the shape of the response.This is not correct. We have changed what this endpoint returns in the back end.
We are using a Single Sign On Integration and on the generateCustomerToken mutation we passed a custom query so we could retrieve additional fields.
This was all working perfectly until we updated to the latest magento-api as you have removed the customQuery parameter from the middleware (although in all the actual composables it is still a valid parameter)
Isn't that the whole point of being able to add custom queries, and why they were added to all the magento-apis?
Yes, I will forward this message and get back to you asap. π
I'll push to get this upgraded to include the
CustomQuery
but I'm not sure how long it will take. I'll let you know as soon as I know.Appreciate that. Hopefully, it's soon as we are stuck at the minute. We had to upgrade to get Node 18 support, but now a core piece of our site functionality does not work.
HI @Darren R π , we have the task to readd the CustomQuery assigned now. I think it should be ready some time next week. I can' t give you an exact date but I can assure you it will be done.
@rohrig That's great, thank you π
Hi @rohrig Just checking in on this one?
It's in review now π
Hi @Darren R π , 2.4.0 for the magento-api is released. We're having an issue with our doc deployment so the change log isn't visible yet. But the issue is fixed in this version.
Hi @rohrig Although the code has been updated, the code is still not correct and passing Custom Queries does not work.
If you look at the update: https://github.com/vuestorefront/magento2/commit/992734bf6221d236a349a404ddb98c0eb890345c
On line 51:
This isn't passing the custom query, I think it should be:
I have tested this by overwriting the file locally.
Can you get the team to look at this please?
will do
@Darren R it may be faster for you to create a PR in this case. π
@rohrig Pull request created: https://github.com/vuestorefront/magento2/pull/1471
GitHub
fix: add the custom query to mutation (#1469) by readio Β· Pull Requ...
π Linked issue
Fixes this: #1469
β Type of change
π Documentation (updates to the documentation, readme or JSDoc annotations)
π Bug fix (a non-breaking change that fixes an issue)
π Enhancemen...
Hi @rohrig Any idea when this will be reviewed and released? This issue is critical for us now.