mercurius
Advanced tools
Comparing version 8.4.1 to 8.4.2
@@ -64,3 +64,3 @@ # TypeScript usage | ||
mercuriusCodegen(mercurius, { | ||
mercuriusCodegen(app, { | ||
// Commonly relative to your root package.json | ||
@@ -67,0 +67,0 @@ targetPath: './src/graphql/generated.ts' |
{ | ||
"name": "mercurius", | ||
"version": "8.4.1", | ||
"version": "8.4.2", | ||
"description": "Fastify GraphQL adapter with gateway and subscription support", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
/* global fetch:false React:false ReactDOM:false GraphiQL:false */ | ||
/* global React:false ReactDOM:false GraphiQL:false SubscriptionsTransportWs: false */ | ||
@@ -20,17 +20,14 @@ const importer = { | ||
function render () { | ||
async function fetcher (params, opts) { | ||
const res = await fetch(window.GRAPHQL_ENDPOINT, { | ||
method: 'post', | ||
headers: { | ||
...opts.headers, | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json' | ||
}, | ||
body: JSON.stringify(params), | ||
credentials: 'include' | ||
}) | ||
const host = window.location.host | ||
return res.json() | ||
} | ||
const websocketProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws' | ||
const url = `${window.location.protocol}//${host}${window.GRAPHQL_ENDPOINT}` | ||
const subscriptionUrl = `${websocketProtocol}://${host}${window.GRAPHQL_ENDPOINT}` | ||
const fetcher = GraphiQL.createFetcher({ | ||
url, | ||
legacyClient: new SubscriptionsTransportWs.SubscriptionClient(subscriptionUrl) | ||
}) | ||
ReactDOM.render( | ||
@@ -52,3 +49,3 @@ React.createElement(GraphiQL, { | ||
const link = document.createElement('link') | ||
link.href = 'https://unpkg.com/graphiql@1.4.0/graphiql.css' | ||
link.href = 'https://unpkg.com/graphiql@1.4.2/graphiql.css' | ||
link.type = 'text/css' | ||
@@ -62,3 +59,4 @@ link.rel = 'stylesheet' | ||
'https://unpkg.com/react-dom@16.8.0/umd/react-dom.production.min.js', | ||
'https://unpkg.com/graphiql@1.4.0/graphiql.min.js' | ||
'https://unpkg.com/graphiql@1.4.2/graphiql.min.js', | ||
'https://unpkg.com/subscriptions-transport-ws@0.9.19/browser/client.js' | ||
]) | ||
@@ -65,0 +63,0 @@ }).then(render) |
@@ -8,6 +8,7 @@ /* global fetch:false caches:false self:false */ | ||
'./main.js', | ||
'https://unpkg.com/graphiql@1.4.0/graphiql.css', | ||
'https://unpkg.com/graphiql@1.4.2/graphiql.css', | ||
'https://unpkg.com/react@16.8.0/umd/react.production.min.js', | ||
'https://unpkg.com/react-dom@16.8.0/umd/react-dom.production.min.js', | ||
'https://unpkg.com/graphiql@1.4.0/graphiql.min.js' | ||
'https://unpkg.com/graphiql@1.4.2/graphiql.min.js', | ||
'https://unpkg.com/subscriptions-transport-ws@0.9.19/browser/client.js' | ||
]) | ||
@@ -14,0 +15,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
775483
1
27388