@strapi/plugin-graphql 4.0.3 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ {
2
+ "plugin.description.long": "Tilføjer GraphQL endpoint med standard API metoder.",
3
+ "plugin.description.short": "Tilføjer GraphQL endpoint med standard API metoder."
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "plugin.description.long": "Agrega un endpoint GraphQL con métodos de API predeterminados.",
3
+ "plugin.description.short": "Agrega un endpoint GraphQL con métodos de API predeterminados."
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-graphql",
3
- "version": "4.0.3",
3
+ "version": "4.0.7",
4
4
  "description": "Adds GraphQL endpoint with default API methods.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,11 +30,11 @@
30
30
  "@apollo/federation": "^0.28.0",
31
31
  "@graphql-tools/schema": "8.1.2",
32
32
  "@graphql-tools/utils": "^8.0.2",
33
- "@strapi/utils": "4.0.3",
33
+ "@strapi/utils": "4.0.7",
34
34
  "apollo-server-core": "3.1.2",
35
35
  "apollo-server-koa": "3.1.2",
36
36
  "glob": "^7.1.7",
37
- "graphql": "15.5.1",
37
+ "graphql": "^15.5.1",
38
38
  "graphql-depth-limit": "^1.1.0",
39
39
  "graphql-iso-date": "^3.6.1",
40
40
  "graphql-playground-middleware-koa": "^1.6.21",
@@ -51,6 +51,9 @@
51
51
  "cross-env": "^7.0.3",
52
52
  "koa": "^2.13.1"
53
53
  },
54
+ "peerDependencies": {
55
+ "@strapi/strapi": "^4.0.0"
56
+ },
54
57
  "engines": {
55
58
  "node": ">=12.22.0 <=16.x.x",
56
59
  "npm": ">=6.0.0"
@@ -61,5 +64,5 @@
61
64
  "description": "Adds GraphQL endpoint with default API methods.",
62
65
  "kind": "plugin"
63
66
  },
64
- "gitHead": "48893ae3fc951b618fd8c4fdc6970e623d2c92db"
67
+ "gitHead": "af0cba8c5b2ba7b371523e8f55413ef0fce98e1e"
65
68
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  const { propOr } = require('lodash/fp');
4
4
  const { policy: policyUtils } = require('@strapi/utils');
5
- const { ForbiddenError } = require('@strapi/utils').errors;
5
+ const { PolicyError } = require('@strapi/utils').errors;
6
6
 
7
7
  const getPoliciesConfig = propOr([], 'policies');
8
8
 
@@ -19,7 +19,7 @@ const createPoliciesMiddleware = (resolverConfig, { strapi }) => {
19
19
  const result = await handler(context, config, { strapi });
20
20
 
21
21
  if (![true, undefined].includes(result)) {
22
- throw new ForbiddenError('Policies failed.');
22
+ throw new PolicyError();
23
23
  }
24
24
  }
25
25