GraphQL Utility

Convert your initial JSON data to a GraphQL typedef, generate fragments from that typedef, and download ready-to-use .js fragment files for your GraphQL project.

{
  "data": {
    "user": {
      "id": "12345",
      "username": "anime_lover",
      "profile": {
        "firstName": "Saitama",
        "lastName": "Sensei",
        "email": "saitama@example.com",
        "contact": {
          "phone": "+1234567890",
          "address": {
            "street": "One Punch St.",
            "city": "Z City",
            "zipCode": "56789",
            "country": "Japan"
          }
        }
      },
      "preferences": {
        "theme": "dark",
        "language": "en",
        "notifications": {
          "email": true,
          "sms": false,
          "push": true
        }
      }
    }
  }
}
type Notifications {
  email: Boolean
  sms: Boolean
  push: Boolean
}

type Preferences {
  theme: String
  language: String
  notifications: Notifications
}

type Address {
  street: String
  city: String
  zipCode: String
  country: String
}

type Contact {
  phone: String
  address: Address
}

type Profile {
  firstName: String
  lastName: String
  email: String
  contact: Contact
}

type User {
  id: String
  username: String
  preferences: Preferences
  profile: Profile
}

type Data {
  user: User
}

type AutogeneratedMainType {
  data: Data
}