I'm trying to implement authorization for graphql-php
in my project. The idea is to have a user access array, where I can set access for each user group to specific queries and mutations, and implementing a check-access method in graphql controller, before the query is executed.
One way would be to parse the request myself, but i was wondering if anyone knew how to access the full path to the query, as I've seen it is shown in https://webonyx.github.io/graphql-php/error-handling/
<?php
[
'message' => 'My reported error',
'category' => 'businessLogic',
'locations' => [
['line' => 10, 'column' => 2]
],
'path' => [
'path',
'to',
'fieldWithException'
]
];