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.
apollo-client-preset-fork
Advanced tools
Use
create-react-app
thenyarn add apollo-client-preset react-apollo graphql
and replace below code forindex.js
import * as React from 'react'
import { render } from 'react-dom'
import ApolloClient from 'apollo-client'
import { HttpLink, InMemoryCache } from 'apollo-client-preset'
import { ApolloProvider, graphql } from 'react-apollo'
import gql from 'graphql-tag'
// Apollo client
const client = new ApolloClient({
link: new HttpLink({ uri: 'https://api.graph.cool/simple/v1/cixos23120m0n0173veiiwrjr' }),
cache: new InMemoryCache().restore({})
})
// Example query from https://www.graph.cool/
const MOVIE_QUERY = gql`
{
Movie(id: "cixos5gtq0ogi0126tvekxo27") {
id
title
actors {
name
}
}
}
`
// Our App
const App = graphql(MOVIE_QUERY)(({ data }) => {
const { loading, Movie } = data
// Loading
if (loading) return <div>loading...</div>
// Loaded
return <p><b>{Movie.title}</b> : {Movie.actors.map(({ name }) => name).join(', ')}</p>
})
const ApolloApp = (
<ApolloProvider client={client}>
<App />
</ApolloProvider>
)
render(ApolloApp, document.getElementById('root'))
FAQs
Core abstract of Caching layer for Apollo Client
We found that apollo-client-preset-fork demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.