@graphql-mesh/http 0.2.1 → 0.2.2

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.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/index.mjs +1 -1
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -67,7 +67,7 @@ function createMeshHTTPHandler({ baseDir, getBuiltMesh, rawServeConfig = {}, pla
67
67
  if (eventName === `webhook:${request.method.toLowerCase()}:${pathname}`) {
68
68
  const body = await request.text();
69
69
  logger.debug(`Received webhook request for ${pathname}`, body);
70
- pubsub.publish(eventName, request.headers.get('application/json') === 'application/json' ? JSON.parse(body) : body);
70
+ pubsub.publish(eventName, request.headers.get('content-type') === 'application/json' ? JSON.parse(body) : body);
71
71
  return new fetch.Response(null, {
72
72
  status: 204,
73
73
  statusText: 'OK',
package/index.mjs CHANGED
@@ -63,7 +63,7 @@ function createMeshHTTPHandler({ baseDir, getBuiltMesh, rawServeConfig = {}, pla
63
63
  if (eventName === `webhook:${request.method.toLowerCase()}:${pathname}`) {
64
64
  const body = await request.text();
65
65
  logger.debug(`Received webhook request for ${pathname}`, body);
66
- pubsub.publish(eventName, request.headers.get('application/json') === 'application/json' ? JSON.parse(body) : body);
66
+ pubsub.publish(eventName, request.headers.get('content-type') === 'application/json' ? JSON.parse(body) : body);
67
67
  return new Response(null, {
68
68
  status: 204,
69
69
  statusText: 'OK',
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-mesh/http",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "*"
7
7
  },
8
8
  "dependencies": {
9
9
  "@graphql-mesh/cross-helpers": "0.2.6",
10
- "@graphql-mesh/runtime": "0.44.22",
10
+ "@graphql-mesh/runtime": "0.44.23",
11
11
  "@graphql-mesh/types": "0.85.0",
12
12
  "@graphql-mesh/utils": "0.41.22",
13
13
  "@whatwg-node/fetch": "^0.4.6",