@graphql-mesh/http 0.1.6 → 0.1.7

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 +6 -1
  2. package/index.mjs +6 -1
  3. package/package.json +6 -6
package/index.js CHANGED
@@ -102,7 +102,12 @@ function createMeshHTTPHandler({ baseDir, getBuiltMesh, logger, rawServeConfig =
102
102
  });
103
103
  }
104
104
  else {
105
- router.get('/', request => fetch.Response.redirect(new URL(graphqlPath, request.url)));
105
+ router.get('/', () => new fetch.Response(null, {
106
+ status: 302,
107
+ headers: {
108
+ Location: graphqlPath,
109
+ },
110
+ }));
106
111
  }
107
112
  router.all(graphqlPath, ittyRouterExtras.withCookies, graphqlHandler(mesh$, playgroundTitle, playgroundEnabled, graphqlPath, corsConfig));
108
113
  return requestHandler;
package/index.mjs CHANGED
@@ -98,7 +98,12 @@ function createMeshHTTPHandler({ baseDir, getBuiltMesh, logger, rawServeConfig =
98
98
  });
99
99
  }
100
100
  else {
101
- router.get('/', request => Response.redirect(new URL(graphqlPath, request.url)));
101
+ router.get('/', () => new Response(null, {
102
+ status: 302,
103
+ headers: {
104
+ Location: graphqlPath,
105
+ },
106
+ }));
102
107
  }
103
108
  router.all(graphqlPath, withCookies, graphqlHandler(mesh$, playgroundTitle, playgroundEnabled, graphqlPath, corsConfig));
104
109
  return requestHandler;
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@graphql-mesh/http",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "*"
7
7
  },
8
8
  "dependencies": {
9
- "@graphql-mesh/cross-helpers": "0.2.5",
10
- "@graphql-mesh/runtime": "0.44.3",
11
- "@graphql-mesh/utils": "0.41.8",
12
- "@whatwg-node/fetch": "0.4.2",
13
- "@whatwg-node/server": "0.2.0",
9
+ "@graphql-mesh/cross-helpers": "0.2.6",
10
+ "@graphql-mesh/runtime": "0.44.4",
11
+ "@graphql-mesh/utils": "0.41.9",
12
+ "@whatwg-node/fetch": "^0.4.3",
13
+ "@whatwg-node/server": "0.3.0",
14
14
  "graphql-yoga": "3.0.0-alpha-20220905163021-e923bb34",
15
15
  "itty-router": "2.6.1",
16
16
  "itty-router-extras": "0.4.2",