Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Remove GraphQL #2977

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions _config/graphql-legacy.yml

This file was deleted.

21 changes: 0 additions & 21 deletions _config/graphql.yml

This file was deleted.

13 changes: 0 additions & 13 deletions _graphql/config.yml

This file was deleted.

17 changes: 0 additions & 17 deletions _graphql/models.yml

This file was deleted.

2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink-anchor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink-internal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 1 addition & 48 deletions client/dist/js/bundle.js

Large diffs are not rendered by default.

25 changes: 0 additions & 25 deletions client/src/boot/registerComponents.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
import Injector from 'lib/Injector';
import AnchorSelectorField from 'components/AnchorSelectorField/AnchorSelectorField';
import readOnePageQuery from 'state/history/readOnePageQuery';
import rollbackPageMutation from 'state/history/rollbackPageMutation';

export default () => {
Injector.component.register('AnchorSelectorField', AnchorSelectorField);

Injector.transform(
'pages-history',
(updater) => {
// Add CMS page history GraphQL query to the HistoryViewer
updater.component('HistoryViewer.pages-controller-cms-content', readOnePageQuery, 'PageHistoryViewer');
}
);

Injector.transform(
'pages-history-revert',
(updater) => {
// Add CMS page revert GraphQL mutation to the HistoryViewerToolbar
updater.component(
'HistoryViewerToolbar.VersionedAdmin.HistoryViewer.SiteTree.HistoryViewerVersionDetail',
// This was using `copyToStage` incorrectly which also provides from and to stage
// arguments. The "rollback" mutation correctly handles relations and is a more consumable
// API endpoint.
rollbackPageMutation,
'PageRevertMutation'
);
}
);
};
32 changes: 14 additions & 18 deletions client/src/legacy/TinyMCE_sslink-anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import i18n from 'i18n';
import TinyMCEActionRegistrar from 'lib/TinyMCEActionRegistrar';
import React from 'react';
import { createRoot } from 'react-dom/client';
import { ApolloProvider } from '@apollo/client';
import { Provider } from 'react-redux';
import jQuery from 'jquery';
import ShortcodeSerialiser from 'lib/ShortcodeSerialiser';
Expand Down Expand Up @@ -73,7 +72,6 @@ jQuery.entwine('ss', ($) => {

renderModal(isOpen) {
const store = ss.store;
const client = ss.apolloClient;
const handleHide = () => this.close();
const handleInsert = (...args) => this.handleInsert(...args);
const attrs = this.getOriginalAttributes();
Expand All @@ -87,22 +85,20 @@ jQuery.entwine('ss', ($) => {
this.setReactRoot(root);
}
root.render(
<ApolloProvider client={client}>
<Provider store={store}>
<InsertLinkInternalModal
isOpen={isOpen}
onInsert={handleInsert}
onClosed={handleHide}
title={i18n._t('CMS.LINK_ANCHOR', 'Link to an anchor on a page')}
bodyClassName="modal__dialog"
className="insert-link__dialog-wrapper--anchor"
fileAttributes={attrs}
identifier="Admin.InsertLinkAnchorModal"
requireLinkText={requireLinkText}
currentPageID={currentPageID}
/>
</Provider>
</ApolloProvider>
<Provider store={store}>
<InsertLinkInternalModal
isOpen={isOpen}
onInsert={handleInsert}
onClosed={handleHide}
title={i18n._t('CMS.LINK_ANCHOR', 'Link to an anchor on a page')}
bodyClassName="modal__dialog"
className="insert-link__dialog-wrapper--anchor"
fileAttributes={attrs}
identifier="Admin.InsertLinkAnchorModal"
requireLinkText={requireLinkText}
currentPageID={currentPageID}
/>
</Provider>
);
},

Expand Down
Loading
Loading