Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@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 2,583,729 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 4 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.