@strapi/plugin-graphql 4.2.0-alpha.9 → 4.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-graphql",
3
- "version": "4.2.0-alpha.9",
3
+ "version": "4.2.0-beta.1",
4
4
  "description": "Adds GraphQL endpoint with default API methods.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,7 +30,7 @@
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.2.0-alpha.9",
33
+ "@strapi/utils": "4.2.0-beta.1",
34
34
  "apollo-server-core": "3.1.2",
35
35
  "apollo-server-koa": "3.1.2",
36
36
  "glob": "^7.1.7",
@@ -64,5 +64,5 @@
64
64
  "description": "Adds GraphQL endpoint with default API methods.",
65
65
  "kind": "plugin"
66
66
  },
67
- "gitHead": "db70f0de7cc73fb469c8a076b89530729cf14142"
67
+ "gitHead": "4fa2804f35e15ed72dfd309fb5bb1c4dba18932f"
68
68
  }
@@ -114,7 +114,11 @@ module.exports = async ({ strapi }) => {
114
114
  },
115
115
 
116
116
  // Apollo Server
117
- server.getMiddleware({ path }),
117
+ server.getMiddleware({
118
+ path,
119
+ cors: serverConfig.cors,
120
+ bodyParserConfig: serverConfig.bodyParserConfig,
121
+ }),
118
122
  ],
119
123
  config: {
120
124
  auth: false,
@@ -23,10 +23,7 @@ module.exports = ({ strapi }) => {
23
23
  t.nonNull.list.field('data', {
24
24
  type: nonNull(entityName),
25
25
 
26
- resolve: pipe(
27
- prop('nodes'),
28
- defaultTo([])
29
- ),
26
+ resolve: pipe(prop('nodes'), defaultTo([])),
30
27
  });
31
28
  },
32
29
  });
@@ -24,10 +24,7 @@ module.exports = ({ strapi }) => {
24
24
  t.nonNull.list.field('data', {
25
25
  type: nonNull(entityName),
26
26
 
27
- resolve: pipe(
28
- prop('nodes'),
29
- defaultTo([])
30
- ),
27
+ resolve: pipe(prop('nodes'), defaultTo([])),
31
28
  });
32
29
 
33
30
  t.nonNull.field('meta', {