Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Is this doc still accurate with the schema?

Solved

Is this doc still accurate with the schema?

danielDOzie
Visitor
3 0 1

I am trying to run a mutation according to the documentation https://shopify.dev/api/storefront/2022-01/mutations/customerCreate  customerCreate. However, I keep getting the error...  Error: Field 'password' doesn't exist on type 'Customer'

 

All this is being done on the storefront API. My client config seems to be working fine with other mutations like the cartCreate, but this has been slowing me down. Any help/ pointer will be greatly appreciated.

See error screenshots:

 

same error on the frontendsame error on the frontenderror on shopify admin graphql mutation on storefront APIerror on shopify admin graphql mutation on storefront API

Accepted Solution (1)

awwdam
Shopify Staff
249 42 38

This is an accepted solution.

Hey @danielDOzie,

I had a closer look at your question, and wanted to share a few insights.

Taking a look at the customer (Object) documentation, there is no "password"  field on the customer object.

However the document you shared is for the customerCreate mutation, where this is a required variable input field of the CustomerCreateInput.  That said, the fields requested in the mutation body will need to be from the customer object (linked above). 

22-38-u1f1a-r055c
Hope that markup on the example mutation we provide adds additional context to the info above, and that this helps clarify any confusion - Cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

awwdam
Shopify Staff
249 42 38

This is an accepted solution.

Hey @danielDOzie,

I had a closer look at your question, and wanted to share a few insights.

Taking a look at the customer (Object) documentation, there is no "password"  field on the customer object.

However the document you shared is for the customerCreate mutation, where this is a required variable input field of the CustomerCreateInput.  That said, the fields requested in the mutation body will need to be from the customer object (linked above). 

22-38-u1f1a-r055c
Hope that markup on the example mutation we provide adds additional context to the info above, and that this helps clarify any confusion - Cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

danielDOzie
Visitor
3 0 1

Thanks, man. I actually figured it out myself and I couldn't much but laugh at the silly confussion.

Another thing is, it seems the customer Address ID changes on every query request. So, if I want to delete a customer address by its ID I have to target the current ID.

And is there any way I can set a particular address to default using the storefront API?