Skip to content

Formateador de GraphQL

Formatea, valida y minifica consultas, mutaciones y esquemas GraphQL, señalando los errores de sintaxis. Funciona en tu dispositivo.

Sin subidas
query GetUser($id: ID!, $first: Int = 10) {
  user(id: $id) {
    id
    name
    ...Avatar
    posts(first: $first) {
      edges {
        node {
          id
          title
          createdAt
        }
      }
    }
  }
}

fragment Avatar on User {
  avatar(size: 64) {
    url
  }
}

✓ Valid GraphQL · 1 operation, 1 fragment

Cómo usar Formateador de GraphQL

  1. 1Abre Formateador de GraphQL. Funciona en tu navegador, sin registro.
  2. 2Escribe o pega tus datos.
  3. 3Copia o descarga el resultado.

Preguntas

Does it validate against my schema?

It checks syntax only (queries, mutations, fragments and SDL schemas). No schema or endpoint is needed.

Is anything sent to a server?

No. Formatting uses the reference graphql-js parser in your browser.

What does minify do?

It strips whitespace, commas and comments that GraphQL ignores, keeping the query identical in meaning.

Más herramientas