Report

Help us improve this tool

GraphQL To Components Generator

Generate TypeScript Apollo, Angular, Stencil, and urql components from GraphQL schema and documents in your browser.

O M T

Generate GraphQL Client Components

GraphQL projects need typed hooks and components that match schema definitions and operation documents. Writing Apollo, Angular, Stencil, or urql bindings by hand is repetitive and drifts quickly when schemas change. This generator produces ready-to-use TypeScript client code from your schema and queries.

What this tool does

Provide a GraphQL schema and an optional operation document (query, mutation, or subscription). Choose a target framework and receive generated TypeScript code with typed variables, result shapes, and framework-specific hooks or services. Output updates in real time as you edit inputs.

Supported targets

  • TypeScript React Apollo hooks and components
  • TypeScript Apollo Angular services
  • TypeScript Stencil Apollo components
  • TypeScript urql hooks

Related GraphQL tools

For Flow type output instead of components, use the GraphQL to Flow Converter. To format raw GraphQL syntax, try the GraphQL Beautifier.

Frequently Asked Questions

Do I need both schema and document inputs?

The schema is required. The document is optional but recommended because component generators need operation definitions to create typed hooks, variables, and result interfaces for specific queries or mutations.

Which Apollo target should I choose?

Pick React Apollo for React apps, Apollo Angular for Angular services, or Stencil Apollo for Stencil web components. Choose urql if your project uses that client instead of Apollo.

Can I upload .graphql files?

Yes. Both schema and document editors support uploading .graphql or .gql files. You can also paste SDL directly into the editors.

Is codegen run on a server?

No. GraphQL Code Generator plugins run locally in your browser. Your schema and operations stay on your device.