@strapi/plugin-graphql 5.5.0 → 5.5.1

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.
@@ -16,7 +16,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
16
16
  });
17
17
  };
18
18
  const name$1 = "@strapi/plugin-graphql";
19
- const version = "5.4.2";
19
+ const version = "5.5.0";
20
20
  const description = "Adds GraphQL endpoint with default API methods.";
21
21
  const repository = {
22
22
  type: "git",
@@ -71,7 +71,7 @@ const dependencies = {
71
71
  "@koa/cors": "5.0.0",
72
72
  "@strapi/design-system": "2.0.0-rc.14",
73
73
  "@strapi/icons": "2.0.0-rc.14",
74
- "@strapi/utils": "5.4.2",
74
+ "@strapi/utils": "workspace:*",
75
75
  graphql: "^16.8.1",
76
76
  "graphql-depth-limit": "^1.1.0",
77
77
  "graphql-playground-middleware-koa": "^1.6.21",
@@ -84,19 +84,19 @@ const dependencies = {
84
84
  };
85
85
  const devDependencies = {
86
86
  "@strapi/sdk-plugin": "^5.2.0",
87
- "@strapi/strapi": "5.4.2",
88
- "@strapi/types": "5.4.2",
87
+ "@strapi/strapi": "workspace:*",
88
+ "@strapi/types": "workspace:*",
89
89
  "@types/graphql-depth-limit": "1.1.5",
90
90
  "@types/koa-bodyparser": "4.3.12",
91
91
  "@types/koa__cors": "5.0.0",
92
92
  "cross-env": "^7.0.3",
93
- "eslint-config-custom": "5.4.2",
93
+ "eslint-config-custom": "workspace:*",
94
94
  koa: "2.15.2",
95
95
  react: "18.3.1",
96
96
  "react-dom": "18.3.1",
97
97
  "react-router-dom": "6.22.3",
98
98
  "styled-components": "6.1.8",
99
- tsconfig: "5.4.2",
99
+ tsconfig: "workspace:*",
100
100
  typescript: "5.3.2"
101
101
  };
102
102
  const peerDependencies = {
@@ -116,7 +116,6 @@ const strapi = {
116
116
  description: "Adds GraphQL endpoint with default API methods.",
117
117
  kind: "plugin"
118
118
  };
119
- const gitHead = "7d785703f52464577d077c4618cbe68b44f8a9cd";
120
119
  const pluginPkg = {
121
120
  name: name$1,
122
121
  version,
@@ -132,8 +131,7 @@ const pluginPkg = {
132
131
  devDependencies,
133
132
  peerDependencies,
134
133
  engines,
135
- strapi,
136
- gitHead
134
+ strapi
137
135
  };
138
136
  const pluginId = "graphql";
139
137
  const prefixPluginTranslations = (trad, pluginId2) => {
@@ -15,7 +15,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
15
15
  });
16
16
  };
17
17
  const name$1 = "@strapi/plugin-graphql";
18
- const version = "5.4.2";
18
+ const version = "5.5.0";
19
19
  const description = "Adds GraphQL endpoint with default API methods.";
20
20
  const repository = {
21
21
  type: "git",
@@ -70,7 +70,7 @@ const dependencies = {
70
70
  "@koa/cors": "5.0.0",
71
71
  "@strapi/design-system": "2.0.0-rc.14",
72
72
  "@strapi/icons": "2.0.0-rc.14",
73
- "@strapi/utils": "5.4.2",
73
+ "@strapi/utils": "workspace:*",
74
74
  graphql: "^16.8.1",
75
75
  "graphql-depth-limit": "^1.1.0",
76
76
  "graphql-playground-middleware-koa": "^1.6.21",
@@ -83,19 +83,19 @@ const dependencies = {
83
83
  };
84
84
  const devDependencies = {
85
85
  "@strapi/sdk-plugin": "^5.2.0",
86
- "@strapi/strapi": "5.4.2",
87
- "@strapi/types": "5.4.2",
86
+ "@strapi/strapi": "workspace:*",
87
+ "@strapi/types": "workspace:*",
88
88
  "@types/graphql-depth-limit": "1.1.5",
89
89
  "@types/koa-bodyparser": "4.3.12",
90
90
  "@types/koa__cors": "5.0.0",
91
91
  "cross-env": "^7.0.3",
92
- "eslint-config-custom": "5.4.2",
92
+ "eslint-config-custom": "workspace:*",
93
93
  koa: "2.15.2",
94
94
  react: "18.3.1",
95
95
  "react-dom": "18.3.1",
96
96
  "react-router-dom": "6.22.3",
97
97
  "styled-components": "6.1.8",
98
- tsconfig: "5.4.2",
98
+ tsconfig: "workspace:*",
99
99
  typescript: "5.3.2"
100
100
  };
101
101
  const peerDependencies = {
@@ -115,7 +115,6 @@ const strapi = {
115
115
  description: "Adds GraphQL endpoint with default API methods.",
116
116
  kind: "plugin"
117
117
  };
118
- const gitHead = "7d785703f52464577d077c4618cbe68b44f8a9cd";
119
118
  const pluginPkg = {
120
119
  name: name$1,
121
120
  version,
@@ -131,8 +130,7 @@ const pluginPkg = {
131
130
  devDependencies,
132
131
  peerDependencies,
133
132
  engines,
134
- strapi,
135
- gitHead
133
+ strapi
136
134
  };
137
135
  const pluginId = "graphql";
138
136
  const prefixPluginTranslations = (trad, pluginId2) => {
@@ -158,6 +158,12 @@ async function bootstrap({ strapi: strapi2 }) {
158
158
  type: "content-api"
159
159
  }
160
160
  };
161
+ const isPlaygroundRequest = ctx.request.method === "GET" && ctx.request.url === path && // Matches the GraphQL endpoint
162
+ playgroundEnabled && // Only allow if the Playground is enabled
163
+ ctx.request.header.accept?.includes("text/html");
164
+ if (isPlaygroundRequest) {
165
+ return next();
166
+ }
161
167
  return strapi2.auth.authenticate(ctx, next);
162
168
  });
163
169
  handler.push(
@@ -136,6 +136,12 @@ async function bootstrap({ strapi: strapi2 }) {
136
136
  type: "content-api"
137
137
  }
138
138
  };
139
+ const isPlaygroundRequest = ctx.request.method === "GET" && ctx.request.url === path && // Matches the GraphQL endpoint
140
+ playgroundEnabled && // Only allow if the Playground is enabled
141
+ ctx.request.header.accept?.includes("text/html");
142
+ if (isPlaygroundRequest) {
143
+ return next();
144
+ }
139
145
  return strapi2.auth.authenticate(ctx, next);
140
146
  });
141
147
  handler.push(
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../server/src/bootstrap.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAW1C,wBAAsB,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAA;CAAE,iBAkIlE"}
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../server/src/bootstrap.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAW1C,wBAAsB,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAA;CAAE,iBA6IlE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-graphql",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "description": "Adds GraphQL endpoint with default API methods.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -55,7 +55,7 @@
55
55
  "@koa/cors": "5.0.0",
56
56
  "@strapi/design-system": "2.0.0-rc.14",
57
57
  "@strapi/icons": "2.0.0-rc.14",
58
- "@strapi/utils": "5.5.0",
58
+ "@strapi/utils": "5.5.1",
59
59
  "graphql": "^16.8.1",
60
60
  "graphql-depth-limit": "^1.1.0",
61
61
  "graphql-playground-middleware-koa": "^1.6.21",
@@ -68,19 +68,19 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@strapi/sdk-plugin": "^5.2.0",
71
- "@strapi/strapi": "5.5.0",
72
- "@strapi/types": "5.5.0",
71
+ "@strapi/strapi": "5.5.1",
72
+ "@strapi/types": "5.5.1",
73
73
  "@types/graphql-depth-limit": "1.1.5",
74
74
  "@types/koa-bodyparser": "4.3.12",
75
75
  "@types/koa__cors": "5.0.0",
76
76
  "cross-env": "^7.0.3",
77
- "eslint-config-custom": "5.5.0",
77
+ "eslint-config-custom": "5.5.1",
78
78
  "koa": "2.15.2",
79
79
  "react": "18.3.1",
80
80
  "react-dom": "18.3.1",
81
81
  "react-router-dom": "6.22.3",
82
82
  "styled-components": "6.1.8",
83
- "tsconfig": "5.5.0",
83
+ "tsconfig": "5.5.1",
84
84
  "typescript": "5.3.2"
85
85
  },
86
86
  "peerDependencies": {
@@ -99,6 +99,5 @@
99
99
  "name": "graphql",
100
100
  "description": "Adds GraphQL endpoint with default API methods.",
101
101
  "kind": "plugin"
102
- },
103
- "gitHead": "7d785703f52464577d077c4618cbe68b44f8a9cd"
102
+ }
104
103
  }