
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@graphql-codegen/typescript-operations
Advanced tools
GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments
The @graphql-codegen/typescript-operations package is a plugin for GraphQL Code Generator that generates TypeScript typings for GraphQL operations (queries, mutations, and subscriptions). It helps in creating type-safe and easy-to-use TypeScript types based on your GraphQL schema and operations, enhancing development efficiency and reducing runtime errors.
Type generation for queries
Generates TypeScript interfaces for the 'GetUsers' query, allowing for type-safe usage of query results.
query GetUsers {
users {
id
name
}
}
Type generation for mutations
Generates TypeScript types for the 'CreateUser' mutation, including the mutation function and its parameters, facilitating type-safe API interactions.
mutation CreateUser($input: CreateUserInput!) {
createUser(input: $input) {
id
name
}
}
Type generation for subscriptions
Generates TypeScript types for the 'OnUserCreated' subscription, enabling type-safe real-time data handling.
subscription OnUserCreated {
userCreated {
id
name
}
}
Similar to @graphql-codegen/typescript-operations, this package generates TypeScript types for your GraphQL schema. However, it focuses more on the schema side rather than operations, making it complementary rather than a direct alternative.
While not a code generation tool, Apollo Client is a comprehensive state management library for JavaScript that fully supports GraphQL. It can be used alongside @graphql-codegen/typescript-operations for a powerful, type-safe GraphQL client experience.
FAQs
GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments
The npm package @graphql-codegen/typescript-operations receives a total of 3,178,601 weekly downloads. As such, @graphql-codegen/typescript-operations popularity was classified as popular.
We found that @graphql-codegen/typescript-operations demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.