Socket
Socket
Sign inDemoInstall

@graphql-codegen/typescript-operations

Package Overview
Dependencies
Maintainers
0
Versions
5877
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-codegen/typescript-operations

GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments


Version published
Weekly downloads
3M
increased by6.07%
Maintainers
0
Weekly downloads
 
Created

What is @graphql-codegen/typescript-operations?

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.

What are @graphql-codegen/typescript-operations's main functionalities?

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
  }
}

Other packages similar to @graphql-codegen/typescript-operations

FAQs

Package last updated on 02 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc