Generating Types from Queries and Mutations

Generating types only from the schema is not enough for client applications. A client operation usually selects only a subset of fields from an object.

For example, the schema may define 20 fields on User, while a particular query selects only id, name, and email. Operation-based code generation can produce a result type representing exactly that selection.

This prevents developers from accidentally assuming that fields exist in a response when they were not requested.