customer.tpl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. type Query {
  2. # Returns a Customer resource by ID.
  3. customer(id: ID!): Customer
  4. }
  5. type Mutation {
  6. customerCreate(input: CustomerInput!): CustomerCreatePayload
  7. }
  8. input CustomerInput {
  9. # The addresses for a customer.
  10. addresses: [MailingAddressInput!]
  11. # The unique email address of the customer.
  12. email: String
  13. # The customer's first name.
  14. firstName: String
  15. # The ID of the customer to update.
  16. id: ID
  17. # The customer's last name.
  18. lastName: String
  19. # The customer's locale.
  20. locale: String
  21. # Additional metafields to associate to the customer.
  22. metafields: [MetafieldInput!]
  23. # A note about the customer.
  24. note: String
  25. # The unique phone number for the customer.
  26. phone: String
  27. # The private metafields to associate with the customer.
  28. privateMetafields: [PrivateMetafieldInput!]
  29. # A list of tags to associate with the customer. Can be an array or a comma-separated list. Example values: ["tag1", "tag2", "tag3"], "tag1, tag2, tag3"
  30. #
  31. # Updating tags overwrites any existing tags that were previously added to the customer. To add new tags without overwriting
  32. # existing tags, use the tagsAdd mutation.
  33. tags: [String!]
  34. }
  35. # Return type for customerCreate mutation.
  36. type CustomerCreatePayload {
  37. # The created customer.
  38. customer: Customer
  39. # The list of errors that occurred from executing the mutation.
  40. userErrors: [UserError!]!
  41. }