
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
@lifeomic/graphql-directive-retry
Advanced tools
Instead of adding retry logic inside the resolver implementation, use this schema directive to add retry declaratively
const { retryDirective, retryDeclaration } = require('@lifeomic/graphql-directive-retry');
const { makeExecutableSchema } = require('graphql-tools');
const { graphql } = require('graphql');
const typeDefs = `
${retryDeclaration('retry')}
type Query {
flakyFunction(arg: String!): String! @retry(maxTimeout: 100)
}
`;
This directive is based on promise-retry and you can use the same configuration options.
You can configure retry behavior on a per-field basis like this:
type Query {
flakyFunction(arg: String!): String!
@retry(retries: 1, minTimeout: 100, maxTimeout: 200, factor: 1.1)
}
You can configure the default retry behavior for all resovlers with a retry directive by providing the configuration in the execution context. Here is an example:
const response = await graphql(
yourSchema,
yourQuery,
rootObject,
{
... yourContext
retryDirectiveConfig: {
retries: 0
}
},
{}
);
FAQs
A GraphQL schema directive to retry resolvers
We found that @lifeomic/graphql-directive-retry 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.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.