
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
graphql-sqs-subscriptions
Advanced tools
This package implements the PubSubEngine Interface from the [graphql-subscriptions](https://github.com/apollographql/graphql-subscriptions) package. It allows you to connect your subscriptions manager to an AWS SQS (Simple Queue Service) queue.
This package implements the PubSubEngine Interface from the graphql-subscriptions package. It allows you to connect your subscriptions manager to an AWS SQS (Simple Queue Service) queue.
npm install graphql-sqs-subscriptions
// or
yarn install graphql-sqs-subscriptions
Define your GraphQL schema with a Subscription
type:
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
type Subscription {
fooAdded: Result
}
type Result {
id: String
}
Create a simple SQSPubSub
instance, passing in your AWS API keys and region:
import { SQSPubSub } from "graphql-sqs-subscriptions";
const pubsub = new SQSPubSub({
accessKeyId: AWS_ACCESS_KEY_ID,
secretAccessKey: AWS_SECRET_ACCESS_KEY,
region: AWS_REGION
});
Now, implement your Subscription resolver, using the pubsub.asyncIterator
method, passing in the relevant trigger name:
export const resolvers = {
Subscription: {
fooAdded: {
subscribe: () => pubsub.asyncIterator("foo_added")
}
}
};
Calling the asyncIterator
method will subscribe the SQSPubSub
instance to any new message on the SQS queue.
Any time pubsub.publish
is then called, with a matching trigger name (i.e. "foo_added"
), GraphQL will publish the data to all subscribed clients.
pubsub.publish("foo_added", { fooAdded: { id: "123" } });
FAQs
This package implements the PubSubEngine Interface from the [graphql-subscriptions](https://github.com/apollographql/graphql-subscriptions) package. It allows you to connect your subscriptions manager to an AWS SQS (Simple Queue Service) queue.
We found that graphql-sqs-subscriptions 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.