Producer Integration
- A new
Producer.page.js
file should be created under theapp/pages
folder - A new folder of
graphql
should be created under app folder - A new file with name
producer.queries.js
should be created underapp/graphql
folder - This file should contain all the
queries
,mutations
andsubscriptions
(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.js
should take advantage ofuseQuery
anduseMutation
from@apollo/client
for 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.js
addrenameBook
,updateBookMetadata
,getBookTeams
,addTeamMember
,removeTeamMember
,teamUpdated
,bookUpdated
,bookComponentUpdated
- in
Producer.page.js
add the handlers ofonImportModal
,onAssetManagerModal
,onMetadataModal
,onInviteUsersModal