Guia de entrevista · GraphQL

What are the core concepts? (schema, types, operations)

do caderno de estudos · atualizado em 2 de outubro de 2026
Para quem vai encarar entrevista de GraphQL2 min

Se a vaga pede GraphQL, vale saber responder isso. A resposta está em inglês de propósito, porque é assim que você vai precisar falar.

A resposta, como você fala na entrevista

Schema: the CONTRACT — a strongly-typed definition of everything the API exposes, written in SDL:

type User {
  id: ID!
  name: String!
  orders: [Order!]!
}

type Query {
  user(id: ID!): User
}

! = non-nullable. [Order!]! allows an empty list, but not a null list or null elements. A field error can produce partial data plus errors. If a non-null field fails, null propagates to the nearest nullable parent, potentially making all data null. Clients must handle errors even when the HTTP request succeeded.

Source: GraphQL response errors.

Operations:
Query = read.
Mutation = an operation intended for writes. Top-level mutation fields execute serially, but this does not automatically wrap them in a database transaction.
Subscription = a stream of results, often transported over WebSockets.
Query fields should remain free of side effects. The server implementation must preserve that contract.

Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.

Treinar essa pergunta no app