Motivated by this philosophy, I made the engine from GraphQL by PoP (my own implementation of a GraphQL server in PHP, soon to be made available as a WordPress plugin) operate by executing directives. In my architecture, directives are a low-level component, which can manipulate the response in any way the developer needs. Then, directives are full power, and, I'd dare say, there is pretty much nothing that cannot be achieved through some custom directive.
The design for the architecture is first conceived on the concept of middleware:
Ultimately, the pipeline incorporates several elements (system directives @validate and @resolveValueAndMerge, multiple fields as inputs per directive, a single pipeline to handle all directives for all fields, and a few others) to make the most out of GraphQL:
I explain in detail this architecture in my latest installment for the GraphQL series: