
Security News
Re-Enabled GitHub Actions Expose Thousands of Repositories to Mini Shai-Hulud
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.
graphql-pluck-types
Advanced tools
Extract TypeScript interface definitions from a GraphQL schema SDL string
Extract TypeScript interface definitions from a GraphQL schema SDL string
npm install graphql-pluck-types
import pluckTypes from 'graphql-pluck-types';
const sdl = `
type User {
id: ID!
name: String!
email: String
posts: [Post!]!
}
type Post {
id: ID!
title: String!
body: String
}
enum Role {
ADMIN
USER
}
input CreateUserInput {
name: String!
email: String!
role: Role!
}
`;
const ts = pluckTypes(sdl);
console.log(ts);
Output:
export interface User {
id: string;
name: string;
email: string | null;
posts: Post[];
}
export interface Post {
id: string;
title: string;
body: string | null;
}
export interface CreateUserInput {
name: string;
email: string;
role: Role;
}
export enum Role {
ADMIN = 'ADMIN',
USER = 'USER',
}
const ts = pluckTypes(sdl, {
scalars: {
DateTime: 'Date',
JSON: 'unknown',
},
});
pluckTypes(sdl, options?)Type: string
A GraphQL schema definition language string.
Type: object
Type: Record<string, string>
Default: {String: 'string', Int: 'number', Float: 'number', Boolean: 'boolean', ID: 'string'}
Custom scalar type mappings from GraphQL scalar names to TypeScript types.
Type: string
TypeScript source code with exported interfaces and enums.
union or scalar declarationsextend typegraphql-codegen for advanced needsMIT
FAQs
Extract TypeScript interface definitions from a GraphQL schema SDL string
We found that graphql-pluck-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.

Research
/Security News
The compromise affects MemTensor's MemOS, an open source memory framework for large language models (LLMs) and AI agents. Both npm package @memtensor/memos-cloud-openclaw-plugin and the PyPI package MemoryOS are compromised. They drop cross-platform Go binaries that exfiltrate developer secrets.