
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.
@aws-amplify/graphql-generation-transformer
Advanced tools
Amplify GraphQL @generation transformer
The Amplify GraphQL Generation Transformer is a tool that enables the quick and easy creation of AI-powered Generation routes within your AWS AppSync API. This transformer can be leveraged by using the @generation
directive to configure AI models and system prompts for generating content.
npm install @aws-amplify/graphql-generation-transformer
The @generation
directive is defined as follows:
directive @generation(aiModel: String!, systemPrompt: String!, inferenceConfiguration: GenerationInferenceConfiguration) on FIELD_DEFINITION
@auth
Directive: Supports existing auth modes like IAM, API key, and Amazon Cognito User Pools.type Query {
generateStory(topic: String!): String
@generation(
aiModel: "anthropic.claude-3-haiku-20240307-v1:0"
systemPrompt: "You are a creative storyteller. Generate a short story based on the given topic."
)
}
type Recipe {
name: String!
ingredients: [String!]!
instructions: [String!]!
prepTime: Int!
cookTime: Int!
servings: Int!
difficulty: String!
}
type Query {
generateRecipe(cuisine: String!, dietaryRestrictions: [String]): Recipe
@generation(
aiModel: "anthropic.claude-3-haiku-20240307-v1:0"
systemPrompt: "You are a professional chef specializing in creating recipes. Generate a detailed recipe based on the given cuisine and dietary restrictions."
)
}
type Query {
generateCode(description: String!): String
@generation(
aiModel: "anthropic.claude-3-haiku-20240307-v1:0"
systemPrompt: "You are an expert programmer. Generate code based on the given description."
inferenceConfiguration: { maxTokens: 500, temperature: 0.7, topP: 0.9 }
)
}
@generation
directive can only be used on Query fields.FAQs
Amplify GraphQL @generation transformer
The npm package @aws-amplify/graphql-generation-transformer receives a total of 6,065 weekly downloads. As such, @aws-amplify/graphql-generation-transformer popularity was classified as popular.
We found that @aws-amplify/graphql-generation-transformer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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.