New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apollo-link-electron-ipc

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-link-electron-ipc

In electron, forward GraqhQL operations to the main process

1.1.1
latest
npm
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

In electron, forward GraqhQL operations to the main process

NPM Version

Install

npm i -S apollo-link-electron-ipc

Usage

// in main
import { createElectronRPCGraphQLRequestExecutor } from 'apollo-link-electron-ipc';
import { HttpLink } from 'apollo-link-http';
import fetch from 'electron-fetch';

// example with HttpLink
createElectronRPCGraphQLRequestExecutor({
  link: new HttpLink({
    uri: 'your-endpoint',
    fetch
  })
});


// in renderer
import { createElectronRPCLink } from 'apollo-link-electron-ipc';
import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';

const client = new ApolloClient({
  link: createElectronRPCLink(),
  cache: new InMemoryCache(),
});

client.query(MY_QUERY);

⚠️ apollo-link-electron-ipc supports ObservableQueries with streaming links, but requires to instantiate ApolloClient with option queryDeduplication: false,. See apollographql/apollo-client#4322

License

MIT

FAQs

Package last updated on 23 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts