It’s often very useful to provide inline performance information in a query response, for example when debugging a slow query. The GraphQL specification allows servers to include additional information as part of the response under an extensions key. This is incredibly useful for metadata like tracing information (e.g. in Apollo)

It’s interesting to note that the reason this is useful/required is because the client is defining the operation and thus the client shares responsibility for making an efficient query. In REST, the server is responsible (only). But in GraphQL, it’s a coordinated effort so instrumentation needs to be shared so that both participants can optimize what they’re doing.


Keyboard Shortcuts

Key Action
o Source
e Edit
i Insight
r Random
h Home
s or / Search
www.joshbeckman.org/notes/210672379