collection.api.graphql 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. type Query {
  2. collections(options: CollectionListOptions): CollectionList!
  3. "Get a Collection either by id or slug. If neither id nor slug is specified, an error will result."
  4. collection(id: ID, slug: String): Collection
  5. collectionFilters: [ConfigurableOperationDefinition!]!
  6. }
  7. type Mutation {
  8. "Create a new Collection"
  9. createCollection(input: CreateCollectionInput!): Collection!
  10. "Update an existing Collection"
  11. updateCollection(input: UpdateCollectionInput!): Collection!
  12. "Delete a Collection and all of its descendants"
  13. deleteCollection(id: ID!): DeletionResponse!
  14. "Move a Collection to a different parent or index"
  15. moveCollection(input: MoveCollectionInput!): Collection!
  16. }
  17. # generated by generateListOptions function
  18. input CollectionListOptions
  19. input MoveCollectionInput {
  20. collectionId: ID!
  21. parentId: ID!
  22. index: Int!
  23. }
  24. input CreateCollectionTranslationInput {
  25. languageCode: LanguageCode!
  26. name: String!
  27. slug: String!
  28. description: String!
  29. }
  30. input UpdateCollectionTranslationInput {
  31. id: ID
  32. languageCode: LanguageCode!
  33. name: String
  34. slug: String
  35. description: String
  36. }
  37. input CreateCollectionInput {
  38. isPrivate: Boolean
  39. featuredAssetId: ID
  40. assetIds: [ID!]
  41. parentId: ID
  42. filters: [ConfigurableOperationInput!]!
  43. translations: [CreateCollectionTranslationInput!]!
  44. }
  45. input UpdateCollectionInput {
  46. id: ID!
  47. isPrivate: Boolean
  48. featuredAssetId: ID
  49. parentId: ID
  50. assetIds: [ID!]
  51. filters: [ConfigurableOperationInput!]
  52. translations: [UpdateCollectionTranslationInput!]
  53. }