Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mercurius

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mercurius - npm Package Compare versions

Comparing version 8.4.1 to 8.4.2

2

docs/typescript.md

@@ -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 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc