{
  "id": "enwiki-001372636557",
  "slug": "graphql",
  "title": "GraphQL",
  "qid": "",
  "lead": "GraphQL is a data query and manipulation language that allows specifying what data is to be retrieved (\"declarative data fetching\") or modified. A GraphQL server can process a client query using data from separate sources and present the results in a unified graph. The language is not tied to any specific database or storage engine. There are several open-source runtime engines for GraphQL.",
  "body": "GraphQL is a data query and manipulation language that allows specifying what data is to be retrieved (\"declarative data fetching\") or modified. A GraphQL server can process a client query using data from separate sources and present the results in a unified graph. The language is not tied to any specific database or storage engine. There are several open-source runtime engines for GraphQL. Fields are defined as nullable by default, and a trailing exclamation mark can be used to make a field non-nullable (required). A field can be defined as a list by wrapping the field's type in square brackets (for example, ). type Query { currentUser: User } type User { id: ID! name: String! } A GraphQL query defines the exact shape of the data needed by the client. query CurrentUser { currentUser { name age } } Once validated and executed by the GraphQL server, the data is returned in the same shape. { \"currentUser\": { \"name\": \"John Doe\", \"age\": 23 } } mutation CreateUser($name: String!, $age: Int!) { createUser(userName: $name, age: $age) { name age } } The variables are passed as an object with fields that match the variable names in the mutation. { \"name\": \"Han Solo\", \"age\": 42 } Once the operation is complete, the GraphQL server will return data matching the shape defined by the mutation. { \"data\": { \"createUser\": { \"name\": \"Han Solo\", \"age\": 42 } } } GraphQL also supports live updates sent from the server to client in an operation called a subscription. Again, the client defines the shape of the data that it needs whenever an update is made. subscription { newPerson { name age } } When a mutation is made through the GraphQL server that updates the associated field, data is sent to all subscribed clients in the format setup through the subscription. { \"newPerson\": { \"name\": \"Jane\", \"age\": 23 } }",
  "categories": [
    "11060667",
    "22920259",
    "22959635",
    "23117742",
    "23603337",
    "26220375",
    "26748027",
    "28493675",
    "29176367",
    "31127017",
    "31128808",
    "33410312",
    "61223397"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1372636557",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1788269963.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001372636557",
    "type": "webpage",
    "title": "GraphQL",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/graphql",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          20
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          20
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001372636557",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1372636557",
    "note": "Immutable snapshot enwiki-001372636557"
  }
}