Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@tipe/nuxt-apollo-module
Advanced tools
> Nuxt.js module to use [vue-apollo](https://github.com/Akryum/vue-apollo) (integrates graphql-tag loader to parse `.gql` & `.graphql` files)
Nuxt.js module to use vue-apollo (integrates graphql-tag loader to parse
.gql
&.graphql
files)
Install apollo module:
npm install --save @nuxtjs/apollo
Add @nuxtjs/apollo
to modules
section of nuxt.config.js
{
// Add apollo module
modules: ['@nuxtjs/apollo'],
// Give apollo module options
apollo: {
networkInterfaces: {
default: '~/apollo/network-interfaces/default.js'
}
}
}
Object
String
String
or Object
Example (nuxt.config.js
):
module.exports = {
modules: ['@nuxtjs/apollo'],
apollo: {
networkInterfaces: {
default: '~/apollo/network-interfaces/default.js',
test: '~/apollo/network-interfaces/test.js'
}
}
}
Then in ~/apollo/network-interfaces/default.js
:
import { createNetworkInterface } from 'apollo-client'
export default (ctx) => {
const networkInterface = createNetworkInterface({
uri: 'https://api.graph.cool/simple/v1/cj1dqiyvqqnmj0113yuqamkuu'
})
// 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 {
networkInterface,
dataIdFromObject: o => o.id
}
}
See Official example and vue-apollo.
FAQs
> Nuxt.js module to use [vue-apollo](https://github.com/Akryum/vue-apollo) (integrates graphql-tag loader to parse `.gql` & `.graphql` files)
We found that @tipe/nuxt-apollo-module demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.