I'm upgrading from 0.13 and I'm wondering how to do something I've been doing:
The goal is to create a Query.IsGranted object containing one field for each existing mutation. and have the resolver of this new field return the value of the mutation access field. This allows the frontends to ask if the current user is allowed to perform a mutation or not. In 0.13 I'm doing this by overriding the Overblog\GraphQLBundle\Config\Processor but I can't do this in 0.14+ because it's not injected TypeGenerator anymore. And I don't know how to achieve the same thing.
Is it still possible?
I think my goal is to update the $typeConfigs given to the TypeGenerator by somehow overriding %overblog_graphql_types.config% but I was not able to find how
alternative: I also tried to create a field resolver and using it to create the query.IsGranted field but I don't think I can access the fields in Mutation from here (and it's unclear this could work given it would need to be resolved only after all mutations have been configured)
Hi!
I'm upgrading from 0.13 and I'm wondering how to do something I've been doing:
The goal is to create a
Query.IsGranted
object containing one field for each existing mutation. and have the resolver of this new field return the value of the mutation access field. This allows the frontends to ask if the current user is allowed to perform a mutation or not. In 0.13 I'm doing this by overriding theOverblog\GraphQLBundle\Config\Processor
but I can't do this in 0.14+ because it's not injectedTypeGenerator
anymore. And I don't know how to achieve the same thing.Is it still possible?
I think my goal is to update the
$typeConfigs
given to theTypeGenerator
by somehow overriding%overblog_graphql_types.config%
but I was not able to find howalternative: I also tried to create a field resolver and using it to create the
query.IsGranted
field but I don't think I can access the fields inMutation
from here (and it's unclear this could work given it would need to be resolved only after all mutations have been configured)