
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
apollo-client-preset
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
The npm package apollo-client-preset receives a total of 5,843 weekly downloads. As such, apollo-client-preset popularity was classified as popular.
We found that apollo-client-preset demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.