@freshsqueezed/mammothgql
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -0,1 +1,8 @@ | ||
## [1.0.8](https://github.com/freshsqueezed/mammothgql/compare/v1.0.7...v1.0.8) (2024-12-18) | ||
### Bug Fixes | ||
* **html:** Add correct url paths ([da0d1ad](https://github.com/freshsqueezed/mammothgql/commit/da0d1ad68790a3f8223340c9882e19281518ab50)) | ||
## [1.0.7](https://github.com/freshsqueezed/mammothgql/compare/v1.0.6...v1.0.7) (2024-12-18) | ||
@@ -2,0 +9,0 @@ |
@@ -103,5 +103,5 @@ "use strict"; | ||
const path = req.path; | ||
const fullUrl = `${protocol}://${host}${path}`; | ||
const fullUrl = `${protocol}://${host}${path}/graphql`; | ||
const wsProtocol = protocol === 'https' ? 'wss' : 'ws'; | ||
const wsUrl = `${wsProtocol}://${host}${path}`; | ||
const wsUrl = `${wsProtocol}://${host}${path}/graphql`; | ||
res.send(` | ||
@@ -163,5 +163,5 @@ <!-- | ||
const fetcher = GraphiQL.createFetcher({ | ||
url: ${fullUrl}, | ||
url: '${fullUrl}', | ||
wsClient: graphqlWs.createClient({ | ||
url: ${wsUrl}, | ||
url: '${wsUrl}', | ||
}), | ||
@@ -168,0 +168,0 @@ }); |
@@ -6,3 +6,3 @@ { | ||
"types": "lib/index.d.ts", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"author": "Matt Gordon <matt@lemonade.tech>", | ||
@@ -9,0 +9,0 @@ "license": "MIT", |
@@ -169,5 +169,5 @@ import { NextFunction, Request, Response } from 'express'; | ||
const path = req.path; | ||
const fullUrl = `${protocol}://${host}${path}`; | ||
const fullUrl = `${protocol}://${host}${path}/graphql`; | ||
const wsProtocol = protocol === 'https' ? 'wss' : 'ws'; | ||
const wsUrl = `${wsProtocol}://${host}${path}`; | ||
const wsUrl = `${wsProtocol}://${host}${path}/graphql`; | ||
@@ -230,5 +230,5 @@ res.send(` | ||
const fetcher = GraphiQL.createFetcher({ | ||
url: ${fullUrl}, | ||
url: '${fullUrl}', | ||
wsClient: graphqlWs.createClient({ | ||
url: ${wsUrl}, | ||
url: '${wsUrl}', | ||
}), | ||
@@ -235,0 +235,0 @@ }); |
Sorry, the diff of this file is not supported yet
37243