Skip to content

Commit

Permalink
Merge pull request strapi#11727 from strapi/plugins/graphql/fix-uploa…
Browse files Browse the repository at this point in the history
…d-scopes-and-bump-version

Bump graphql-upload version & link content API scope to the custom mutations
  • Loading branch information
alexandrebodin authored Dec 1, 2021
2 parents 68af6a3 + df8bfe4 commit f21e094
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
13 changes: 13 additions & 0 deletions packages/core/upload/server/graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,19 @@ module.exports = ({ strapi }) => {
['Mutation.createUploadFile']: { auth: { scope: 'plugin::upload.content-api.upload' } },
['Mutation.updateUploadFile']: { auth: { scope: 'plugin::upload.content-api.upload' } },
['Mutation.deleteUploadFile']: { auth: { scope: 'plugin::upload.content-api.destroy' } },

[`Mutation.${UPLOAD_MUTATION_NAME}`]: {
auth: { scope: 'plugin::upload.content-api.upload' },
},
[`Mutation.${MULTIPLE_UPLOAD_MUTATION_NAME}`]: {
auth: { scope: 'plugin::upload.content-api.upload' },
},
[`Mutation.${UPDATE_FILE_INFO_MUTATION_NAME}`]: {
auth: { scope: 'plugin::upload.content-api.upload' },
},
[`Mutation.${DELETE_FILE_MUTATION_NAME}`]: {
auth: { scope: 'plugin::upload.content-api.destroy' },
},
},
};
});
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"graphql-playground-middleware-koa": "^1.6.21",
"graphql-type-json": "^0.3.2",
"graphql-type-long": "^0.1.1",
"graphql-upload": "12.0.0",
"graphql-upload": "^13.0.0",
"koa-compose": "^4.1.0",
"lodash": "4.17.21",
"nexus": "1.1.0",
Expand Down
17 changes: 8 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11572,16 +11572,15 @@ graphql-type-long@^0.1.1:
resolved "https://registry.yarnpkg.com/graphql-type-long/-/graphql-type-long-0.1.1.tgz#c1b1323f7b3bb3fe48f05502b883145f90adbfd6"
integrity sha512-pIp/F3LR0qqfbF4TX3CwBwPskA7850KG6/DnzaYJtdgxxzw20dcKfutLbyk8okBGg8iHbFoXgnZWHgfwNmxSZw==

graphql-upload@12.0.0:
version "12.0.0"
resolved "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-12.0.0.tgz#2351d20d294e920fb25d2eba9f7c352e37a1a02b"
integrity sha512-ovZ3Q7sZ17Bmn8tYl22MfrpNR7nYM/DUszXWgkue7SFIlI9jtqszHAli8id8ZcnGBc9GF0gUTNSskYWW+5aNNQ==
graphql-upload@^13.0.0:
version "13.0.0"
resolved "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-13.0.0.tgz#1a255b64d3cbf3c9f9171fa62a8fb0b9b59bb1d9"
integrity sha512-YKhx8m/uOtKu4Y1UzBFJhbBGJTlk7k4CydlUUiNrtxnwZv0WigbRHP+DVhRNKt7u7DXOtcKZeYJlGtnMXvreXA==
dependencies:
busboy "^0.3.1"
fs-capacitor "^6.2.0"
http-errors "^1.8.0"
isobject "^4.0.0"
object-path "^0.11.5"
http-errors "^1.8.1"
object-path "^0.11.8"

[email protected]:
version "15.5.1"
Expand Down Expand Up @@ -12123,7 +12122,7 @@ [email protected]:
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"

[email protected], http-errors@^1.6.3, http-errors@^1.7.3, http-errors@^1.8.0, http-errors@~1.8.0:
[email protected], http-errors@^1.6.3, http-errors@^1.7.3, http-errors@^1.8.0, http-errors@^1.8.1, http-errors@~1.8.0:
version "1.8.1"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c"
integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==
Expand Down Expand Up @@ -16468,7 +16467,7 @@ object-keys@^1.0.12, object-keys@^1.1.1:
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==

object-path@^0.11.5:
object-path@^0.11.8:
version "0.11.8"
resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.8.tgz#ed002c02bbdd0070b78a27455e8ae01fc14d4742"
integrity sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==
Expand Down

0 comments on commit f21e094

Please sign in to comment.