Format a GraphQL document with readable selection sets, arguments, and fragments.
GraphQL punctuation, names, arguments, selections, and fragments are tokenized and emitted with consistent indentation and line breaks. Comments and string values stay attached to their syntax.
query { user(id: 1) { name email posts { title } } }
query {
user(id: 1) {
name email posts {
title
}
}
}
Apollo queries, introspection debugging, and persisted-query normalization format GraphQL.