Producer Integration
- A new
Producer.page.jsfile should be created under theapp/pagesfolder - A new folder of
graphqlshould be created under app folder - A new file with name
producer.queries.jsshould be created underapp/graphqlfolder - This file should contain all the
queries,mutationsandsubscriptions(schemas) needed for the Producer page like:- e.g.
getBook,addBookComponent,deleteBookComponent,renameBookComponent,updateContent,ingestWordFiles,lockBookComponent(https://gitlab.coko.foundation/ketida/ketida/-/blob/websocket-locks/packages/client/app/components/bookbuilder/src/queries/ingestWordFile.js, https://gitlab.coko.foundation/ketida/ketida/-/tree/websocket-locks/packages/client/app/components/wax/src/queries)
- e.g.
-
Producer.page.jsshould take advantage ofuseQueryanduseMutationfrom@apollo/clientfor the execution of the above queries
Until the actual UI become ready the Producer.page.js should return a dummy div. An example of a connected page is like here https://gitlab.coko.foundation/ketida/ketida/-/blob/websocket-locks/packages/client/app/components/wax/src/EditorPageWithData.js
Additional functionality:
- in
producer.queries.jsaddrenameBook,updateBookMetadata,getBookTeams,addTeamMember,removeTeamMember,teamUpdated,bookUpdated,bookComponentUpdated - in
Producer.page.jsadd the handlers ofonImportModal,onAssetManagerModal,onMetadataModal,onInviteUsersModal
Edited by Alexandros Georgantas