
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
react-apollo-typed-hooks
Advanced tools
Wrappers for Apollo's React hooks with simplified typings
Wrappers for Apollo's React hooks with simplified typings.
tl;dr:
Mutation
or Query
with type parameters for the shapes of the
result data and the allowed parameters for each query or mutation allowed by
your application.useQuery
and useMutation
with the same API provided by
@apollo/react-hooks
, but pass the instance instead of the query node. You'll
get detailed type information for all query and mutation variables and
results.import * as React from "react";
import gql from "graphql-tag";
import { Query, useQuery } from "react-apollo-typed-hooks";
const QUERY = gql`
query {
testQuery {
ok
}
}
`;
class TestQuery extends Query<{ testQuery: { ok: boolean } }, {}> {}
const q = new TestQuery(QUERY);
export const Component = () => {
const { data } = useQuery(q);
return <div>{data?.testQuery?.ok && `${data.testQuery.ok}`</div>;
};
Copyright © 2020 Jesse B. Hannah. Licensed under the MIT License.
FAQs
Wrappers for Apollo's React hooks with simplified typings
We found that react-apollo-typed-hooks 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.