Fix documents UI
- Fix redirection after document deletion in detail page - Fix refetch after publication - Return proper error when trying to update a published document Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -11,9 +11,12 @@ import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
export const DocumentsConnectionKey = "DocumentsListQuery_documents";
|
||||
|
||||
const deleteDocumentMutation = graphql`
|
||||
mutation DocumentGraphDeleteMutation($input: DeleteDocumentInput!) {
|
||||
mutation DocumentGraphDeleteMutation(
|
||||
$input: DeleteDocumentInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteDocument(input: $input) {
|
||||
deletedDocumentId @deleteRecord
|
||||
deletedDocumentId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user