Huge News!Announcing our $40M Series B led by Abstract Ventures.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
  • Socket score

Version published
Maintainers
1
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

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