Tuesday, 18 March 25 06:08
Create customer By Graphql Mutation
We can create custom mutation for create customer by graphql. For that we can create custom request and response query string.
Step 1. Create a schema.graphqls file in your module's etc directory.
type Mutation { createCustomerAccount( id: String @doc(description: "Id of requested resource") firstname: String! @doc(description: "The customer's name") lastname: String @doc(description: "The customer's family name") phone: String! @doc(description: "The customer's Phone number") email: String! @doc(description: "The customer's email address. Required") password: String @doc(description: "The customer's password") gender: String @doc(description: "The customer's gender") registrationchannel: Channel @doc(description: "The customer's registration channel") ): CreateCustomerResponse @resolver(class: "\\Vendor\\CustomerLogin\\Model\\Resolver\\CreateCustomer") @doc(description:"Create customer account") } enum Channel { WEB SOCIAL APP } type CreateCustomerResponse { status: Boolean @doc(description: "Request Status") message: String @doc(description: "Success Message") }
Continue...