All Release Notes
Retrieve ShoppingLists via GraphQL
1 November 2019
Composable Commerce
HTTP API
Enhancement
CartsGraphQL
You can now query for ShoppingLists and My Shopping Lists on the GraphQL API.
- [GraphQL API] Added the following types to the GraphQL schema:
ShoppingList
,ShoppingListLineItem
,ShoppingListQueryInterface
,ShoppingListQueryResult
,TextLineItem
. - [GraphQL API] Changed the
Me
type:- Added the
shoppingList
field to theMe
type. - Added the
shoppingLists
field to theMe
type.
- Added the
- [GraphQL API] Changed the
InStoreMe
type:- Added the
shoppingList
field to theInStoreMe
type. - Added the
shoppingLists
field to theInStoreMe
type.
- Added the
- [GraphQL API] Changed the
Query
type:- Added the
shoppingList
field to theQuery
type. Query
object type now implementsShoppingListQueryInterface
interface- Added the
shoppingLists
field to theQuery
type.
- Added the
- [GraphQL API] Changed the
MeQueryInterface
type:- Added the
shoppingLists
field to theMeQueryInterface
type. - Added the
shoppingList
field to theMeQueryInterface
type.
- Added the
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): ShoppingListshoppingLists(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): ShoppingListshoppingLists(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): ShoppingListshoppingLists(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): ShoppingListshoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult!}type ShoppingList implements Versioned {key: Stringname("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!]): StringnameAllLocales: [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!]): StringdescriptionAllLocales: [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!]): StringslugAllLocales: [LocalizedString!]customerRef: Referencecustomer: CustomeranonymousId: StringlineItems: [ShoppingListLineItem!]!textLineItems: [TextLineItem!]!custom: CustomFieldsTypedeleteDaysAfterLastModification: Intid: String!version: Long!createdAt: DateTime!lastModifiedAt: DateTime!createdBy: InitiatorlastModifiedBy: Initiator}type ShoppingListLineItem {id: String!productId: String!variantId: IntproductTypeRef: 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!]): StringnameAllLocales: [LocalizedString!]!deactivatedAt: DateTimecustom: CustomFieldsTypeproductSlug("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!]): Stringvariant: 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): ShoppingListshoppingLists(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!]): StringnameAllLocales: [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!]): StringdescriptionAllLocales: [LocalizedString!]quantity: Int!custom: CustomFieldsTypeaddedAt: DateTime!}