Rewrite upload mutations
Rewrite upload mutations to be placed directly on the relevant item, requiring only a single call from the frontend.
Resources
Old
2 separate steps, content and icon
uploadResource(contextId: String!, upload: ContentInput!)
uploadIcon(contextId: String!, upload: ContentInput!)
New
createResource(
collectionId: String!,
resource: ResourceInput!,
content: UploadInput!,
icon: UploadInput
)
Collections
Old
uploadIcon(contextId: String!, upload: ContentInput!)
New
createCollection(
communityId: String!,
collection: CollectionInput!,
icon: UploadInput
)
Communities
Old
2 separate steps, icon and image
uploadIcon(contextId: String!, upload: ContentInput!)
uploadImage(contextId: String!, upload: ContentInput!)
New
createCommunity(
community: CommunityInput!,
image: UploadInput,
icon: UploadInput
)
Users
2 separate steps, icon and image
uploadIcon(contextId: String!, upload: ContentInput!)
uploadImage(contextId: String!, upload: ContentInput!)
New
createUser(
user: UserInput!,
image: UploadInput,
icon: UploadInput
)
Edited by James Laver