Description
Hey.
Disclaimer: I've made little research; at this point, this is more of a questionnaire than an issue with a ready solution. My idea is to gather some feedback and see if that's even in the scope of this project before going forward with it.
There are open issues in this project that have no good way of implementing them without tightly coupling graphql-php with the implementation. One example of this is Apollo tracing, but there are more. This is useful for any kind of tracing, logging, custom extensions etc.
One way other GraphQL implementations battle this is by adding "extensions API" (also called "plugins API" and "instrumentations") - those are simple hook points to allow the user to execute arbitrary code on different points of query's execution.
Sometimes the same thing is implemented in form of events - as is the case with Lighthouse. In the scope of graphql-php, we could allow specifying an optional PSR-14 event dispatcher and use it throughout graphql-php
.
Would graphql-php be open to address those needs in a similar fashion?