@strapi/plugin-graphql 4.8.2 → 4.9.0-beta.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.
- package/package.json +7 -8
- package/server/bootstrap.js +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-graphql",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.9.0-beta.1",
|
|
4
4
|
"description": "Adds GraphQL endpoint with default API methods.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@graphql-tools/schema": "8.5.1",
|
|
31
31
|
"@graphql-tools/utils": "^8.12.0",
|
|
32
|
-
"@strapi/design-system": "1.6.
|
|
33
|
-
"@strapi/helper-plugin": "4.
|
|
34
|
-
"@strapi/icons": "1.6.
|
|
35
|
-
"@strapi/utils": "4.
|
|
32
|
+
"@strapi/design-system": "1.6.6",
|
|
33
|
+
"@strapi/helper-plugin": "4.9.0-beta.1",
|
|
34
|
+
"@strapi/icons": "1.6.6",
|
|
35
|
+
"@strapi/utils": "4.9.0-beta.1",
|
|
36
36
|
"apollo-server-core": "3.11.1",
|
|
37
37
|
"apollo-server-koa": "3.10.0",
|
|
38
38
|
"glob": "^7.1.7",
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
"koa-compose": "^4.1.0",
|
|
45
45
|
"lodash": "4.17.21",
|
|
46
46
|
"nexus": "1.3.0",
|
|
47
|
-
"pluralize": "^8.0.0"
|
|
48
|
-
"subscriptions-transport-ws": "0.9.19"
|
|
47
|
+
"pluralize": "^8.0.0"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"cross-env": "^7.0.3",
|
|
@@ -72,5 +71,5 @@
|
|
|
72
71
|
"description": "Adds GraphQL endpoint with default API methods.",
|
|
73
72
|
"kind": "plugin"
|
|
74
73
|
},
|
|
75
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "ff37d666d0634fc84827e3d6419d916618275572"
|
|
76
75
|
}
|
package/server/bootstrap.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const { isEmpty, mergeWith, isArray } = require('lodash/fp');
|
|
4
|
-
const { execute, subscribe } = require('graphql');
|
|
5
|
-
const { SubscriptionServer } = require('subscriptions-transport-ws');
|
|
6
4
|
const { ApolloServer } = require('apollo-server-koa');
|
|
7
5
|
const {
|
|
8
6
|
ApolloServerPluginLandingPageDisabled,
|
|
@@ -81,24 +79,6 @@ module.exports = async ({ strapi }) => {
|
|
|
81
79
|
|
|
82
80
|
const serverConfig = merge(defaultServerConfig, config('apolloServer'));
|
|
83
81
|
|
|
84
|
-
// Handle subscriptions
|
|
85
|
-
if (config('subscriptions')) {
|
|
86
|
-
const subscriptionServer = SubscriptionServer.create(
|
|
87
|
-
{ schema, execute, subscribe },
|
|
88
|
-
{ server: strapi.server.httpServer, path }
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
serverConfig.plugins.push({
|
|
92
|
-
async serverWillStart() {
|
|
93
|
-
return {
|
|
94
|
-
async drainServer() {
|
|
95
|
-
subscriptionServer.close();
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
},
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
82
|
// Create a new Apollo server
|
|
103
83
|
const server = new ApolloServer(serverConfig);
|
|
104
84
|
|