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

ENH Remove unused legacy graphql code #1474

Merged
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
40 changes: 0 additions & 40 deletions _config/graphql-legacy.yml

This file was deleted.

4 changes: 2 additions & 2 deletions client/dist/js/bundle.js

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions client/src/boot/registerQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@ import Injector from 'lib/Injector';
import { fileInterface, file } from 'lib/fileFragments';
import readFilesQuery from 'state/files/readFilesQuery';
import readOneFileQuery from 'state/files/readOneFileQuery';
import readFilesQueryLegacy from 'state/files/_legacy/readFilesQuery';
GuySartorelli marked this conversation as resolved.
Show resolved Hide resolved
import readDescendantFileCountsQuery from 'state/files/readDescendantFileCountsQuery';
import readOneFileQueryLegacy from 'state/files/_legacy/readOneFileQuery';
import readFileUsageQuery from 'state/files/readFileUsageQuery';

// Backward compatibility hack. Remove when GraphQL 4 is in core
const isLegacy = !!document.body.getAttribute('data-graphql-legacy');

const registerQueries = () => {
Injector.query.registerFragment('FileInterfaceFields', fileInterface);
Injector.query.registerFragment('FileFields', file);
Injector.query.register('ReadFilesQuery', isLegacy ? readFilesQueryLegacy : readFilesQuery);
Injector.query.register('ReadFilesQuery', readFilesQuery);
Injector.query.register('readDescendantFileCountsQuery', readDescendantFileCountsQuery);
Injector.query.register('ReadOneFileQuery', isLegacy ? readOneFileQueryLegacy : readOneFileQuery);
Injector.query.register('ReadOneFileQuery', readOneFileQuery);
Injector.query.register('readFileUsageQuery', readFileUsageQuery);
};
export default registerQueries;
146 changes: 0 additions & 146 deletions client/src/state/files/_legacy/readFilesQuery.js

This file was deleted.

51 changes: 0 additions & 51 deletions client/src/state/files/_legacy/readOneFileQuery.js

This file was deleted.

5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
},
"autoload": {
"psr-4": {
"SilverStripe\\AssetAdmin\\": [
"code/",
"_legacy/"
],
"SilverStripe\\AssetAdmin\\": "code/",
"SilverStripe\\AssetAdmin\\Tests\\": "tests/php/",
"SilverStripe\\AssetAdmin\\Tests\\Behat\\Context\\": "tests/behat/src/"
}
Expand Down
70 changes: 0 additions & 70 deletions tests/php/GraphQL/Legacy/CreateFolderMutationCreatorTest.php

This file was deleted.

Loading
Loading