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.

how to create code in graphql for login page with password field

how to create code in graphql for login page with password field

umang-pancholi
Shopify Partner
20 0 1

how to create code in graphql for login page without password field...

===============Query Mutation Work on admin side====================

mutation createCustomerMetafields($inputCustomerInput!) {
  customerCreate(input$input) {
    customer {
      id
      lastName
      phone
      email
      metafields(first3) {
        edges {
          node {
            id
            namespace
            key
            value
          }
        }
      }
    }
    userErrors {
      message
      field
    }
  }
}


 ===============variables====================

{
  "input": {
    "metafields": [
      {
        "namespace": "password",
        "key": "password",
        "type": "single_line_text_field",
        "value": "rob"
      }
    ],
    "email": "dhoni@dhoni.com",
    "lastName":"umang",
    "phone":"+917777777777"
  }
}
Screenshot_4.png

 

Replies 4 (4)

Liam
Community Manager
3108 344 894

Hi Umang,

 

Just to confirm, would this be a login page that customers would interact with? Where exactly would this be accessible to users?

Liam | Developer Advocate @ 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

umang-pancholi
Shopify Partner
20 0 1

yes i want to login customer and also for registration

 

Liam
Community Manager
3108 344 894

I believe for this you'd be using the customerCreate mutation on the Storefront API. Can you describe what the exact use-case is?

Liam | Developer Advocate @ 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

umang-pancholi
Shopify Partner
20 0 1

i want to add [password field in login and registration query how it is possible ?