GraphQLBundle
GraphQLBundle copied to clipboard
control public fields based on contextValue passed to executor
the fields I need to show clients are dynamic based on executor contextValue
example
privateData:
type: PrivateType
public: '@=context["schema"] in ["admin"]'
the key schema above is injected via Events::PRE_EXECUTOR event.
it seems this need lots of change, so does webonyx/graphql-php . Can we collect schema types aware of contextValue parameter passed to executor
the easiest way I can think is to inject the contextValue into the $globalVariable.
create a custom synthetic service to which the contextValue wil be injected, then save this service into the GlobalVariables service.