Generate fully typed TypeScript clients for any GraphQL API. Version 10.4.0 targets Node >=12, ships TypeScript types, and is actively maintained. Key differentiators: client generation with runtime URL/header/retry configuration, response listeners, and alias support. Unlike alternatives like graphql-request or Apollo Client, it separates code generation from runtime usage, producing a standalone client file that can be imported without additional dependencies.
npm install graphql-ts-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates a TypeScript client from a GraphQL endpoint and uses it to query users.
Ensure endpoint is provided and valid.
Remove verbose option and implement custom logging if needed.
Use __alias to override the method name if needed.
Use import { generateTypescriptClient } from 'graphql-ts-client'Provide a valid GraphQL endpoint URL in the generateTypescriptClient call.
No dependency data recorded yet.