Skip to content

Commit

Permalink
API Remove GraphQL
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Aug 1, 2024
1 parent 29bcbaf commit e5bd7ae
Show file tree
Hide file tree
Showing 76 changed files with 1,244 additions and 3,857 deletions.
10 changes: 0 additions & 10 deletions _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,3 @@ Name: assetadminmodals
SilverStripe\Admin\ModalController:
extensions:
- SilverStripe\AssetAdmin\Extensions\RemoteFileModalExtension
---
Name: asset-admin-graphql-thumbnails
Only:
moduleexists: 'silverstripe/graphql'
---
SilverStripe\Core\Injector\Injector:
SilverStripe\AssetAdmin\Model\ThumbnailGenerator.graphql:
class: SilverStripe\AssetAdmin\Model\ThumbnailGenerator
properties:
Generates: false
10 changes: 0 additions & 10 deletions _config/graphql.yml

This file was deleted.

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

This file was deleted.

23 changes: 0 additions & 23 deletions _graphql/interfaces.yml

This file was deleted.

39 changes: 0 additions & 39 deletions _graphql/mutations.yml

This file was deleted.

4 changes: 0 additions & 4 deletions _graphql/queries.yml

This file was deleted.

5 changes: 0 additions & 5 deletions _graphql/types/DescendantFileCount.yml

This file was deleted.

37 changes: 0 additions & 37 deletions _graphql/types/File.yml

This file was deleted.

24 changes: 0 additions & 24 deletions _graphql/types/FileFilterInput.yml

This file was deleted.

7 changes: 0 additions & 7 deletions _graphql/types/FileInput.yml

This file was deleted.

5 changes: 0 additions & 5 deletions _graphql/types/FileUsage.yml

This file was deleted.

40 changes: 0 additions & 40 deletions _graphql/types/Folder.yml

This file was deleted.

7 changes: 0 additions & 7 deletions _graphql/types/FolderInput.yml

This file was deleted.

12 changes: 0 additions & 12 deletions _graphql/types/PublicationNotice.yml

This file was deleted.

11 changes: 0 additions & 11 deletions _graphql/unions.yml

This file was deleted.

31 changes: 1 addition & 30 deletions client/dist/js/TinyMCE_sslink-file.js

Large diffs are not rendered by default.

31 changes: 1 addition & 30 deletions client/dist/js/TinyMCE_ssmedia.js

Large diffs are not rendered by default.

31 changes: 1 addition & 30 deletions client/dist/js/bundle.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions client/src/boot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import AssetAdminRouter from 'containers/AssetAdmin/AssetAdminRouter';
import applyTransform from 'boot/applyTransform';
import registerReducers from 'boot/registerReducers';
import registerComponents from 'boot/registerComponents';
import registerQueries from 'boot/registerQueries';
import { joinUrlPaths } from 'lib/urls';

document.addEventListener('DOMContentLoaded', () => {
Expand Down Expand Up @@ -37,7 +36,5 @@ document.addEventListener('DOMContentLoaded', () => {
],
});

registerQueries();

registerReducers();
});
16 changes: 0 additions & 16 deletions client/src/boot/registerQueries.js

This file was deleted.

10 changes: 8 additions & 2 deletions client/src/components/BulkActions/tests/BulkActions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ test('BulkActions canApply() shows an action button when canApply returns true',
callback: () => true,
},
],
items: [{ applies: true }]
items: [{ applies: true }],
onClearSelection: () => {},
onSelectAll: () => {},
}}
/>
);
Expand All @@ -59,7 +61,9 @@ test('BulkActions canApply() shows an action button when canApply returns false'
callback: () => true,
},
],
items: [{ applies: false }]
items: [{ applies: false }],
onClearSelection: () => {},
onSelectAll: () => {},
}}
/>
);
Expand All @@ -83,6 +87,8 @@ test('BulkActions getOptionsByValue() should return the option which matches the
},
],
items: [{ applies: true }],
onClearSelection: () => {},
onSelectAll: () => {},
}}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ test('GalleryItem getThumbnailStyles() should return backgroundImage with the co
expect(thumbnail.classList).toContain('gallery-item__thumbnail--small');
});

test('GalleryItem getThumbnailStyles() should return backgroundImage with the correct data-url when thumbnail is included in graphql body', () => {
test('GalleryItem getThumbnailStyles() should return backgroundImage with the correct data-url when thumbnail is included in json response', () => {
const { container } = render(
<GalleryItem {...makeProps({
item: {
Expand Down
11 changes: 3 additions & 8 deletions client/src/components/UploadField/UploadField.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class UploadField extends Component {
*/
renderDropzone() {
const { AssetDropzone } = this.props;
if (!this.props.data.createFileEndpoint) {
if (!this.props.data.endpoints.createFile) {
return null;
}
const dimensions = {
Expand All @@ -423,8 +423,8 @@ class UploadField extends Component {
const maxFilesize = this.getMaxFilesize();

const dropzoneOptions = {
url: this.props.data.createFileEndpoint.url,
method: this.props.data.createFileEndpoint.method,
url: this.props.data.endpoints.createFile.url,
method: this.props.data.endpoints.createFile.method,
paramName: 'Upload',
maxFiles,
maxFilesize,
Expand Down Expand Up @@ -575,11 +575,6 @@ UploadField.propTypes = {
disabled: PropTypes.bool,
data: PropTypes.shape({
files: PropTypes.arrayOf(fileShape),
createFileEndpoint: PropTypes.shape({
url: PropTypes.string.isRequired,
method: PropTypes.string.isRequired,
payloadFormat: PropTypes.string.isRequired,
}),
multi: PropTypes.bool,
parentid: PropTypes.number,
canUpload: PropTypes.bool,
Expand Down
15 changes: 10 additions & 5 deletions client/src/components/UploadField/tests/UploadField-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ function makeProps(obj = {}) {
multi: true,
maxFiles: null,
maxFilesize: null,
createFileEndpoint: {
url: 'test',
method: 'POST',
payloadFormat: 'json',
endpoints: {
createFile: {
url: 'test',
method: 'POST',
payloadFormat: 'json',
},
},
parentid: 0,
files,
Expand Down Expand Up @@ -176,6 +178,7 @@ test('UploadField getFolderId() should match 0 for file in root', async () => {
render(
<UploadField {...makeProps({
data: {
...makeProps().data,
parentid: 23
}
})}
Expand Down Expand Up @@ -268,7 +271,9 @@ test('UploadField renderDropzone() should not render the dropzone when there is
<UploadField {...makeProps({
data: {
...makeProps().data,
createFileEndpoint: null,
endpoints: {
createFile: null
}
}
})}
/>
Expand Down
Loading

0 comments on commit e5bd7ae

Please sign in to comment.