REST to GraphQL conversion tools
Since Jul 7Updated Oct 28, 2026Based on 45 AI responses
Reviewed by Dimitry Apollonsky
Which brands AI mentions
| Mentioned in | ChatGPTChatGPT | Google AI ModeGoogle AI Mode |
|---|---|---|
| Stepzen | 48% | 100% |
| Hasura | 52% | 68% |
| GraphQL Mesh | 35% | 73% |
| OpenAPI-to-GraphQL | 26% | 32% |
| Apollo GraphQL | 43% | 5% |
Questions and answers
Google AI ModeOct 28, 2026
If you want to convert a REST API into GraphQL with minimal manual work , the best approach is to use tools that consume an OpenAPI / Swagger specification or use a declarative CLI import to auto-generate the schema and resolvers.
The top tools for this job, ranked by how fast and automated they are, include:
- OpenAPI-to-GraphQL (Open Source Library/CLI): Maintained by IBM, this is one of the most automated tools available if you already have an OpenAPI/Swagger file (OAS 2.0 or 3.0). It automatically reads your REST endpoints, parameters, and response objects, translates GET requests into queries and POST/PUT/DELETE into mutations, and spins up a fully functional GraphQL schema and runtime resolver engine instantly.
- IBM StepZen (Declarative CLI /
@restdirective): StepZen allows you to run a quick CLI command (likestepzen import curlor importing an OpenAPI spec) that instantly introspects your REST endpoint and auto-generates the corresponding GraphQL SDL and@restdirectives. It handles translating query parameters, headers, and payloads automatically. - WunderGraph (Modern Backend Framework): WunderGraph uses a config-as-code approach where you pass your REST/OpenAPI dependencies into a configuration file. It automatically introspects the REST APIs, creates a "virtual graph" over them, and handles caching, authentication, and request routing without requiring you to manually write boilerplate resolver code.
- Hasura / PostGraphile (Database-to-GraphQL alternative): If your "REST API" is actually just a direct wrapper over a PostgreSQL or MySQL database, skip building REST entirely. Tools like Hasura or PostGraphile auto-generate a high-performance GraphQL API directly from your database schema with zero manual code.
If you'd like to proceed, tell me:
- Do you have an OpenAPI / Swagger file for the REST API?
- Are you looking for a local development library or a cloud-hosted service?
I can give you the exact setup commands for the best-fit tool.
Sources cited in this answer6
- npmjs.comopenapi-to-graphql - npm
- ibm.comEnd of support for IBM API Connect Essentials as a Service
- github.comREADME.md - IBM/openapi-to-graphql
- ibm.comTutorial: Transform a REST API to GraphQL - IBM Documentation
- wundergraph.comA comprehensive Guide to WunderGraph and WunderGraph ...
- zuplo.comAutomatically Generate REST and GraphQL APIs From Your - Zuplo
ChatGPTOct 28, 2026
The best fit is Swagger-to-GraphQL if your REST API already has a Swagger/OpenAPI specification. It automatically generates an executable GraphQL schema and connects GraphQL resolvers to the existing REST endpoints, with minimal manual work.
Here are the top options:
1. Swagger-to-GraphQL
(Best for OpenAPI specs)
Converts Swagger/OpenAPI definitions into an executable GraphQL schema, including HTTP calls to existing REST endpoints.
Website:
2. Hasura
Best for integrating existing REST endpoints into a larger GraphQL API. You can import OpenAPI specifications and configure REST endpoints as GraphQL actions, with permissions and request transformations.
Website:
3. OpenAPI-to-GraphQL
A good option for generating a GraphQL layer directly from an existing OpenAPI definition, particularly when integrating REST services into a GraphQL gateway.
Source:
My recommendation: Start with Swagger-to-GraphQL for straightforward automatic conversion, or Hasura if you need a managed GraphQL layer over multiple REST APIs.
One question that will help narrow it down: Does your REST API already have an OpenAPI/Swagger specification, or do you only have the API endpoints and source code?
Sources cited in this answer5
- npmjs.comswagger-to-graphql - npm
- github.comGitHub - yarax/swagger-to-graphql: Swagger to GraphQL API adapter · GitHub
- hasura.ioConvert REST endpoints from OpenAPI spec to GraphQL in 2 clicks
- github.comGitHub - hasura/rest-api-examples: Create a Federated GraphQL API with REST APIs
- hasura.ioHasura: Creator of PromptQL, Data Delivery Network & GraphQL Engine
ChatGPTOct 17, 2026
If you want to automate the conversion of REST APIs into GraphQL schemas with minimal manual effort, the best approach is to use a REST-to-GraphQL integration tool that can generate GraphQL types, queries, mutations, and resolvers from existing REST endpoints.
The key is to avoid manually writing a resolver for every endpoint while still supporting authentication, request parameters, nested data, and error handling.
Best solutions to consider
1. GraphQL Mesh — Best for flexible, automated integration
Connects to REST APIs through OpenAPI/Swagger specifications and generates a GraphQL interface, including operations and types. It supports configuration for authentication headers and customization.
Best for: Developers who want a configurable, code-first solution that can run in their own infrastructure.
Docs:
OpenAPI integration:
2. StepZen — Best for quick setup
Its CLI can inspect a REST endpoint's JSON response and generate GraphQL types and schema fields. It also supports authentication headers and deployment workflows.
Best for: Getting a working GraphQL endpoint with minimal initial coding.
Docs:
3. Hasura — Best for a managed workflow
Can import OpenAPI specifications to create GraphQL Actions for REST endpoints, including input and output types. You can then configure access controls and integrate these operations into your GraphQL API.
Best for: Teams that want a graphical setup experience and centralized API access control.
Docs:
My recommendation
I'd start with GraphQL Mesh if you have OpenAPI specifications for your REST APIs, or StepZen if your priority is generating a working schema quickly from an endpoint's response. If you have no API specification, StepZen's response-based import can be a useful starting point.
For a robust, repeatable automation pipeline, aim for this workflow:
REST API / OpenAPI specification
Automatic schema and resolver generation
Validation, authentication and error mapping
Deployable GraphQL endpoint
One important caveat: automatic generation reduces manual work, but you should still validate nested relationships, pagination, authentication, and mutation behavior. If you need to keep the GraphQL schema synchronized as REST APIs change, build schema regeneration and compatibility checks into CI/CD.
Let's narrow it down
Are your REST APIs documented with an OpenAPI/Swagger file, or do you only have the endpoint URLs?
[I have OpenAPI specs] [I only have REST URLs] [Compare deployment options]
Sources cited in this answer7
- the-guild.devGraphQL Mesh
- the-guild.devOpenAPI / Swagger | GraphQL Mesh v0
- ibm.comEnd of support for IBM API Connect Essentials as a Service
- ibm.comEnd of support for IBM API Connect Essentials as a Service
- ibm.comStepZen documentation
- hasura.ioConvert REST endpoints from OpenAPI spec to GraphQL in 2 clicks
Google AI ModeOct 17, 2026
Automating the transition from a REST API to a GraphQL schema without heavy manual intervention requires leveraging specification-driven tools or declarative low-code gateways . Instead of writing types by hand, these tools read your existing REST contracts (like OpenAPI/Swagger specs) or introspect endpoints to auto-generate the GraphQL layer.
Top low-effort, automated solutions available:
- OpenAPI-to-GraphQL
- What it does: An open-source library and CLI tool that takes an existing OpenAPI Specification (OAS v2.0 or v3.x) from your REST API and automatically translates it into a functional GraphQL schema.
- How it works with low effort: If your REST API already exposes a Swagger/OpenAPI JSON or YAML file, you point the tool at it via the OpenAPI-to-GraphQL NPM Package . It handles queries, mutations, nested fields, and even basic/API key authentication mappings automatically.
- Best for: Teams that already maintain an OpenAPI specification for their REST services.
- StepZen (by IBM)
- What it does: A declarative platform designed to construct GraphQL APIs quickly using custom directives (like
@rest) that point to backend endpoints. - How it works with low effort: StepZen can introspect existing backends or ingest configuration files, mapping parameters and query strings automatically without requiring you to write custom server resolvers in JavaScript or TypeScript.
- Best for: Enterprise environments looking for a managed or declarative approach to unify multiple REST and database backends into a single graph with minimal boilerplate.
- What it does: A declarative platform designed to construct GraphQL APIs quickly using custom directives (like
- Hasura (REST Connectors / Actions)
- What it does: While traditionally used to instantly auto-generate GraphQL from databases, Hasura also supports connecting existing REST APIs using Actions or specialized connectors.
- How it works with low effort: It lets you wrap REST endpoints into the Hasura metadata framework, allowing you to query them through your unified GraphQL engine without manually coding standard CRUD mapping layers.
- Best for: Projects wanting an instant, high-performance GraphQL engine wrapper with built-in security and subscription capabilities.
If you want to narrow this down, let me know:
- Do you already have an OpenAPI / Swagger spec for your REST APIs?
- Are you looking for an open-source library you can self-host, or a managed service/gateway?
Also asked as
- I need a tool that automates the process of turning REST APIs into GraphQL schemas without much manual effort.