@graphcommerce/graphql-mesh 4.1.7 → 4.2.0
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/CHANGELOG.md +18 -0
- package/api/createEnvelop.ts +8 -13
- package/package.json +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1633](https://github.com/graphcommerce-org/graphcommerce/pull/1633) [`4487db309`](https://github.com/graphcommerce-org/graphcommerce/commit/4487db309df01a22f49876cf4a5574ece303a8ca) Thanks [@timhofman](https://github.com/timhofman)! - Send gcms-locales header to the Hypgraph backend so requests are translated.
|
|
8
|
+
|
|
9
|
+
## 4.1.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#1614](https://github.com/graphcommerce-org/graphcommerce/pull/1614) [`448c77681`](https://github.com/graphcommerce-org/graphcommerce/commit/448c77681f9a7794e84ec93139d7e0f16afafbd9) Thanks [@paales](https://github.com/paales)! - Update mesh versions
|
|
14
|
+
|
|
15
|
+
## 4.1.8
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#1590](https://github.com/graphcommerce-org/graphcommerce/pull/1590) [`3ff0e7f2d`](https://github.com/graphcommerce-org/graphcommerce/commit/3ff0e7f2d26edad228848268d24e9aaf56cd2c30) Thanks [@paales](https://github.com/paales)! - useExtendContext doesn’t need to be added in createEnvelop already added by default
|
|
20
|
+
|
|
3
21
|
## 4.1.7
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/api/createEnvelop.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
|
-
import {
|
|
2
|
+
import { useApolloTracing } from '@envelop/apollo-tracing'
|
|
3
|
+
import { createServer as createYogaServer } from '@graphql-yoga/node'
|
|
4
|
+
import { NextApiRequest, NextApiResponse } from 'next'
|
|
3
5
|
import { getBuiltMesh, rawServeConfig } from '../.mesh'
|
|
4
6
|
|
|
5
7
|
export async function createServer(endpoint: string) {
|
|
@@ -9,16 +11,11 @@ export async function createServer(endpoint: string) {
|
|
|
9
11
|
const { cors, playgroundTitle } = rawServeConfig ?? {}
|
|
10
12
|
|
|
11
13
|
// pass the Mesh instance to Yoga and configure GraphiQL
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
headers: req.headers,
|
|
18
|
-
cookies: req.cookies,
|
|
19
|
-
res,
|
|
20
|
-
})),
|
|
21
|
-
],
|
|
14
|
+
return createYogaServer<{
|
|
15
|
+
req: NextApiRequest
|
|
16
|
+
res: NextApiResponse
|
|
17
|
+
}>({
|
|
18
|
+
plugins: [...mesh.plugins, useApolloTracing()],
|
|
22
19
|
context: ({ req }) => ({ ...req, ...mesh.meshContext }),
|
|
23
20
|
graphiql: {
|
|
24
21
|
endpoint,
|
|
@@ -30,6 +27,4 @@ export async function createServer(endpoint: string) {
|
|
|
30
27
|
logging: mesh.logger,
|
|
31
28
|
cors,
|
|
32
29
|
})
|
|
33
|
-
|
|
34
|
-
return server.requestListener
|
|
35
30
|
}
|
package/package.json
CHANGED
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
"name": "@graphcommerce/graphql-mesh",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.2.0",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "index.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@
|
|
11
|
-
"@graphql-mesh/
|
|
12
|
-
"@graphql-mesh/
|
|
13
|
-
"@graphql-mesh/
|
|
14
|
-
"@graphql-mesh/
|
|
15
|
-
"@graphql-
|
|
10
|
+
"@envelop/apollo-tracing": "^3.5.0",
|
|
11
|
+
"@graphql-mesh/apollo-link": "^6.0.0",
|
|
12
|
+
"@graphql-mesh/config": "6.2.0",
|
|
13
|
+
"@graphql-mesh/graphql": "0.30.0",
|
|
14
|
+
"@graphql-mesh/transform-filter-schema": "0.14.87",
|
|
15
|
+
"@graphql-mesh/types": "0.80.2",
|
|
16
|
+
"@graphql-mesh/utils": "0.40.0",
|
|
17
|
+
"@graphql-yoga/node": "^2.13.11",
|
|
16
18
|
"graphql": "16.5.0",
|
|
17
19
|
"next": "12.2.5"
|
|
18
20
|
},
|