A worked example, rendered from real sample data. Sign in to run the tool on your own input.
type Query {
users(first: Int): [User]
user(id: ID!): User
}
type User {
id: ID
name: String
email: String
posts: [Post]
}
type Post {
id: ID
title: String
body: String
}query MyOperation($first: Int) {
users(first: $first) {
id
name
email
posts {
id
title
body
}
}
}
Generate GraphQL queries from a schema definition. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.