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

@tipe/nuxt-apollo-module

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tipe/nuxt-apollo-module - npm Package Compare versions

Comparing version 0.0.6 to 3.0.1

.npmignore

6

package.json
{
"name": "@tipe/nuxt-apollo-module",
"version": "0.0.6",
"version": "3.0.1",
"license": "MIT",
"main": "index.js",
"repository": "https://github.com/tipe/apollo-module",
"homepage": "https://github.com/tipe/apollo-module",
"repository": "https://github.com/nuxt-community/apollo-module",
"homepage": "https://github.com/nuxt-community/apollo-module",
"publishConfig": {

@@ -9,0 +9,0 @@ "access": "public"

@@ -15,3 +15,4 @@ import 'isomorphic-fetch'

const { isDev, isClient, isServer, app, route, beforeNuxtRender, store } = ctx
const { isDev, app, route, beforeNuxtRender, store } = ctx
const isServer = (process.server !== undefined) ? process.server : ctx.isServer

@@ -24,4 +25,4 @@ <% Object.keys(options.clientConfigs).forEach((key) => { %>

const opts = isServer ? {
ssrMode: true,
cache: new InMemoryCache()
ssrMode: true,
cache: new InMemoryCache()
} : {

@@ -28,0 +29,0 @@ initialState: window.__NUXT__ ? window.__NUXT__.apollo.<%= key === 'default' ? 'defaultLink' : key %> : null,

@@ -25,4 +25,4 @@ # Apollo

apollo: {
networkInterfaces: {
default: '~/apollo/network-interfaces/default.js'
clientConfigs: {
default: '~/apollo/clientConfigs/default.js'
}

@@ -35,3 +35,3 @@ }

- networkInterfaces: `Object`
- clientConfig: `Object` Config passed to ApolloClient
- default: `String`

@@ -45,3 +45,3 @@ - [otherClient]: `String` or `Object`

apollo: {
networkInterfaces: {
clientConfigs: {
default: '~/apollo/network-interfaces/default.js',

@@ -57,17 +57,16 @@ test: '~/apollo/network-interfaces/test.js'

```js
import { createNetworkInterface } from 'apollo-client'
import { HttpLink } from 'apollo-link-http'
import { InMemoryCache } from 'apollo-cache-inmemory'
// make sure to export default
export default (ctx) => {
const networkInterface = createNetworkInterface({
uri: 'https://api.graph.cool/simple/v1/cj1dqiyvqqnmj0113yuqamkuu'
})
// compose your Links here for the current client
const appLink = new HttpLink({ uri: 'https://graphql-url.com' })
// here you can place your middleware. ctx has the context forwarded from Nuxt
// you can return the networkInterface directly or return an object with additional
// apollo-client options
// return networkInterface
// alternative return a object with constructor options of apollo-client
// return the an object with additional apollo-client options
return {
networkInterface,
link: appLink,
cache: new InMemoryCache(),
dataIdFromObject: o => o.id

@@ -74,0 +73,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