GraphQL Query Builder

Build GraphQL queries visually with field selection and nested queries

Select Fields

Generated query will appear here

Sample Schema


type User {
  id: ID!
  name: String!
  email: String!
  age: Int
  createdAt: String!
  posts: [Post!]!
  friends: [User!]!
}

type Post {
  id: ID!
  title: String!
  content: String
  author: User!
  comments: [Comment!]!
  createdAt: String!
}

type Comment {
  id: ID!
  text: String!
  author: User!
  post: Post!
  createdAt: String!
}

type Query {
  user(id: ID!): User
  users(limit: Int, offset: Int): [User!]!
  post(id: ID!): Post
  posts(limit: Int): [Post!]!
  searchUsers(query: String!): [User!]!
}

type Mutation {
  createUser(name: String!, email: String!, age: Int): User!
  updateUser(id: ID!, name: String, email: String): User
  deleteUser(id: ID!): Boolean
  createPost(title: String!, content: String): Post!
  addComment(postId: ID!, text: String!): Comment!
}

Use this tool to quickly build GraphQL queries. Select your operation type, choose fields, and generate the query string. For more complex queries, you can add nested field selections.