Platform Release 1 November 2019

You can now query for ShoppingLists and My Shopping Lists on our GraphQL API.

Introduced the following changes to the GraphQL schema (in SDL format):

extend type Me {
  shoppingList(
    "Queries with specified ID"
    id: String,

    "Queries with specified key"
    key: String): ShoppingList
  shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult!
}

extend type InStoreMe {
  shoppingList(
    "Queries with specified ID"
    id: String,

    "Queries with specified key"
    key: String): ShoppingList
  shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult!
}

extend type Query {
  shoppingList(
    "Queries with specified ID"
    id: String,

    "Queries with specified key"
    key: String): ShoppingList
  shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult!
}

extend interface MeQueryInterface {
  shoppingList(
    "Queries with specified ID"
    id: String,

    "Queries with specified key"
    key: String): ShoppingList
  shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult!
}

type ShoppingList implements Versioned {
  key: String
  name(
    "String is defined for different locales. This argument specifies the desired locale."
    locale: Locale,

    "List of languages the client is able to understand, and which locale variant is preferred."
    acceptLanguage: [Locale!]): String
  nameAllLocales: [LocalizedString!]!
  description(
    "String is defined for different locales. This argument specifies the desired locale."
    locale: Locale,

    "List of languages the client is able to understand, and which locale variant is preferred."
    acceptLanguage: [Locale!]): String
  descriptionAllLocales: [LocalizedString!]
  slug(
    "String is defined for different locales. This argument specifies the desired locale."
    locale: Locale,

    "List of languages the client is able to understand, and which locale variant is preferred."
    acceptLanguage: [Locale!]): String
  slugAllLocales: [LocalizedString!]
  customerRef: Reference
  customer: Customer
  anonymousId: String
  lineItems: [ShoppingListLineItem!]!
  textLineItems: [TextLineItem!]!
  custom: CustomFieldsType
  deleteDaysAfterLastModification: Int
  id: String!
  version: Long!
  createdAt: DateTime!
  lastModifiedAt: DateTime!
  createdBy: Initiator
  lastModifiedBy: Initiator
}

type ShoppingListLineItem {
  id: String!
  productId: String!
  variantId: Int
  productTypeRef: Reference!
  productType: ProductTypeDefinition!
  quantity: Int!
  addedAt: DateTime!
  name(
    "String is defined for different locales. This argument specifies the desired locale."
    locale: Locale,

    "List of languages the client is able to understand, and which locale variant is preferred."
    acceptLanguage: [Locale!]): String
  nameAllLocales: [LocalizedString!]!
  deactivatedAt: DateTime
  custom: CustomFieldsType
  productSlug(
    "String is defined for different locales. This argument specifies the desired locale."
    locale: Locale,

    "List of languages the client is able to understand, and which locale variant is preferred."
    acceptLanguage: [Locale!]): String
  variant: ProductVariant
}

"Fields to access shopping lists. Includes direct access to a single list and searching for shopping lists."
interface ShoppingListQueryInterface {
  shoppingList(
    "Queries with specified ID"
    id: String,

    "Queries with specified key"
    key: String): ShoppingList
  shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult!
}

type ShoppingListQueryResult {
  offset: Int!
  count: Int!
  total: Long!
  results: [ShoppingList!]!
}

type TextLineItem {
  id: String!
  name(
    "String is defined for different locales. This argument specifies the desired locale."
    locale: Locale,

    "List of languages the client is able to understand, and which locale variant is preferred."
    acceptLanguage: [Locale!]): String
  nameAllLocales: [LocalizedString!]!
  description(
    "String is defined for different locales. This argument specifies the desired locale."
    locale: Locale,

    "List of languages the client is able to understand, and which locale variant is preferred."
    acceptLanguage: [Locale!]): String
  descriptionAllLocales: [LocalizedString!]
  quantity: Int!
  custom: CustomFieldsType
  addedAt: DateTime!
}