During my yii2 graphql implementation i realized that it would by very helpful to allow internal requests against
\yii\rest\ActiveController. Also see Internal Requests To Restful Api?
In GraphQL there is only a single endpoint (usually
/graphql) that is always requested via POST. So currently it is problematic to dispatch incoming requests via graphql to the corresponding
ActiveController (e.g. via
Yii::$app->runAction) because the
VerbFilter will prohibit to run the
ViewAction for example. But even if this would work, there are problems with some authentication mechanisms (like
QueryParamAuth) that might be used in an
In order to re-use existing
ActiveController's for the GraphQL endpoint it would be really helpful if there is a way to internally call the actions in it. Everything that is usually supplied in the request to the REST endpoint (like GET parameters for authentication, pagination, filtering, etc.) should be possible to be passed programmatically.