Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic registerCustomerAccount mutation #388

Closed
jonyw4 opened this issue Jun 22, 2020 · 6 comments
Closed

Dynamic registerCustomerAccount mutation #388

jonyw4 opened this issue Jun 22, 2020 · 6 comments
Milestone

Comments

@jonyw4
Copy link
Contributor

jonyw4 commented Jun 22, 2020

I added a few custom customer options in config but they are not in registerCustomerAccount mutation.
I think that the mutation registerCustomerAccount should be dynamic because Vendure have a feature to customize the Customer schema.

@jonyw4
Copy link
Contributor Author

jonyw4 commented Jun 22, 2020

This is related to this issue #387

@oncode
Copy link
Contributor

oncode commented Jun 22, 2020

It would also be nice to have a way of setting the custom fields of an Order. 👍

@michaelbromley
Copy link
Member

@oncode Do you mean setting Order custom fields via the Admin API & Admin UI?

@oncode
Copy link
Contributor

oncode commented Jul 2, 2020

@michaelbromley via the Admin API. I think there is currently no mutation where you can set the custom fields of the Order type. setCustomerForOrder, setOrderShippingAddress, setOrderShippingMethod or addPaymentToOrder have no CustomFields param. Maybe a new mutation (e.g. setOrderCustomFields) or a new param for all the order methods would be nice.

As example my use case: Currently I have an optional comment field at the end of the checkout and save it via the metadata param of addPaymentToOrder, because I can't save the comment in any mutation to the CustomField of the Order. There it would be nice to avoid another request and be able to save CustomFields with addPaymentToOrder for example, but maybe that's a bit weird as API design.

@michaelbromley
Copy link
Member

@oncode Yep, that makes sense.

In the both the Shop & Admin API I think we'd want a separate mutation to modify the custom fields. I agree that tacking it on to addPaymentToOrder would be weird.

Would you mind opening a new issue for this so we can track it?

@oncode
Copy link
Contributor

oncode commented Jul 2, 2020

@michaelbromley Ah yes sry, actually meant Shop API, but Admin API would also make sense. Will add a new issue. 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants