OpenAPI / Swagger to GraphQL SDL Schema Converter
Convert OpenAPI 3.0 REST endpoints, request bodies, and JSON schemas into GraphQL SDL types, queries, mutations, and input definitions.
# ==============================================================================
# GraphQL SDL Schema synthesized from OpenAPI / Swagger
# Title: Swagger Petstore (1.0.0)
# Base Server: https://petstore3.swagger.io/api/v3
# Generated by ToolsAA 100% Client-Side Engine
# ==============================================================================
"""ISO-8601 compliant datetime representation"""
scalar DateTime
"""Arbitrary unstructured JSON object data"""
scalar JSON
schema {
query: Query
mutation: Mutation
}
type Query {
# --- Pets ---
"""List all pets"""
listPets(status: ListPetsStatusEnum, limit: Int): [Pet!]!
"""Find pet by ID"""
getPetById(petId: ID!): Pet!
}
type Mutation {
# --- Pets ---
"""Create a pet"""
createPet(input: NewPetInput!): Pet!
"""Update an existing pet"""
updatePet(petId: ID!, input: NewPetInput!): Pet!
"""Deletes a pet"""
deletePet(petId: ID!): Boolean!
}
enum NewPetStatusEnum {
AVAILABLE
PENDING
SOLD
}
enum PetStatusEnum {
AVAILABLE
PENDING
SOLD
}
enum ListPetsStatusEnum {
AVAILABLE
PENDING
SOLD
}
type Category {
id: ID!
name: String!
}
type Tag {
id: ID!
name: String!
}
type NewPet {
name: String!
category: Category
photoUrls: [String!]!
tags: [Tag!]
status: NewPetStatusEnum
}
type Pet {
id: ID!
name: String!
category: Category
photoUrls: [String!]!
tags: [Tag!]
status: PetStatusEnum!
createdAt: DateTime
}
input CategoryInput {
id: ID!
name: String!
}
input TagInput {
id: ID!
name: String!
}
input NewPetInput {
name: String!
category: CategoryInput
photoUrls: [String!]!
tags: [TagInput!]
status: NewPetStatusEnum
}
Zero-Server Privacy Guarantee
All OpenAPI specs, internal models, and confidential API endpoints are parsed exclusively in your browser memory. Nothing is ever sent to external cloud servers.
Complete GraphQL SDL Synthesis
Automatically synthesizes Query fields from GET requests, Mutation fields with strongly typed inputs from POST/PUT/PATCH/DELETE endpoints, and maps JSON schemas to GraphQL object types.
Production Apollo & Relay Ready
Outputs standard GraphQL Schema Definition Language compliant with Apollo Server, GraphQL Yoga, Nexus, AWS AppSync, Hasura, and client tooling like Codegen.