
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
@cortexql/ts2graphql
Advanced tools
A runtime tranpiler and generator that converts your TypeScript code into GraphQL types
Set your enviroment to have the following directories
Include all GraphQL types in separated files that export the TypeScript type.
Interface TypeScript types are converted to GraphQL Input Object Type
// types/Login.ts
/**
* Login input
*/
export interface Login {
/**
* The user's email address
*/
email: string;
/**
* The user's plain password
*/
password: string;
}
// schema/Login.graphql
# Login input
input Login {
# The user's email address
email: String!
# The user's plain password
password: String!
}
Class TypeScript types are converted to GraphQL Object Type
// types/User.ts
import { Post } from './Post';
/**
* User object
*/
export class User {
/**
* The user's unique id
*/
id: string;
/**
* The user's email address
*/
email: string;
/**
* The user's plain password
* @GraphQL.disable
*/
password: string;
/**
* Get latest user's posts
*/
async getLatestPosts(
args: {
/**
* The maximum number of posts to fetch
*/
limit?: number = 10
},
context: any
): Promise<Post[]> {
// ...
}
/**
* Check user password
* @GraphQL.disable
*/
checkPassword(password: string): boolean {
// ...
}
}
// schema/User.graphql
# User object
type User {
# The user's unique id
id: String!
# The user's email address
email: String!
# Get latest user's posts
getLatestPosts(
# The maximum number of posts to fetch
limit: Float = 10
): [Post]
}
ts2graphql -p src -o build/graphql
TODO: More examples and tutorials
FAQs
A TypeScrpt transpiler to GraphQL for your project
The npm package @cortexql/ts2graphql receives a total of 0 weekly downloads. As such, @cortexql/ts2graphql popularity was classified as not popular.
We found that @cortexql/ts2graphql 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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.