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

hasura-connector

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hasura-connector - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

35

index.js

@@ -1,11 +0,18 @@

const {ApolloClient, split, InMemoryCache, HttpLink} = require("apollo-boost");
const {WebSocketLink} = require('@apollo/client/link/ws');
"use strict";
const fetch = global.fetch || (typeof window === 'undefined'
? require('node-fetch')
: require('whatwg-fetch'));
const {
ApolloClient,
split,
InMemoryCache,
HttpLink
} = require("apollo-boost");
const {
WebSocketLink
} = require('@apollo/client/link/ws');
const fetch = global.fetch || (typeof window === 'undefined' ? require('node-fetch') : require('whatwg-fetch'));
const cache = new InMemoryCache();
const createClient = (url) => {
const createClient = url => {
const wsLink = process.browser ? new WebSocketLink({

@@ -17,3 +24,2 @@ uri: `ws://${url}/v1/graphql`,

}) : null;
const httpLink = new HttpLink({

@@ -23,15 +29,12 @@ uri: `http://${url}/v1/graphql`,

});
return new ApolloClient({
cache,
link: process.browser ? split(
({query}) => {
return true;
},
wsLink,
httpLink,
) : httpLink,
link: process.browser ? split(({
query
}) => {
return true;
}, wsLink, httpLink) : httpLink
});
}
};
module.exports = createClient;
{
"name": "hasura-connector",
"version": "0.0.2",
"version": "0.0.3",
"description": "Hasura connect package",

@@ -5,0 +5,0 @@ "main": "index.js",

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