
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
appsync-schema-converter
Advanced tools
The sole purpose of this package is to convert modern GraphQL schemas into AppSync compatible version.
printSchema()
is a copy of graphql@^15/utilities/printSchema.js
with AppSync specific options added.convertSchemas(schemas: [string])
takes an array of GraphQL SDL string and converts them into one single AppSync comptaible schema.This package also made with serverless-appsync-plugin
in mind, especially useful when merge-graphql-schemas
was in your stack.
You make use of variables in JavaScript and write a little script to merge schemas into AppSync compatible one.
Based on your serverless-appsync-plugin
settings, change this line in your serverless.yml
.
custom:
appSync:
schema: ${file(schema.js):compile}
Then read and convert your schemas in schema.js@compile
.
const glob = require("fast-glob");
const { promises: fs } = require("fs");
const { convertSchemas } = require("appsync-schema-converter");
const SCHEMA_PATH = "./schema.graphql";
module.exports.compile = async (_) => {
let schemas;
schemas = await glob(`${__dirname}/schemas/**/*.graphql`);
schemas = await Promise.all(schemas.map((schema) => fs.readFile(schema, { encoding: "utf-8" })));
schemas = await convertSchemas(schemas, {
commentDescriptions: true,
includeDirectives: true,
includeEnumDescriptions: false,
interfaceSeparator: ", ",
});
// Or use the simplified version: convertAppSyncSchemas(schemas);
await fs.writeFile(SCHEMA_PATH, schemas);
return SCHEMA_PATH;
};
1.1.2
Include types in the final bundle for better DX
FAQs
Converts GraphQL schemas into AppSync compatible version.
We found that appsync-schema-converter 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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.