How To Specify A Specific Schema to Resolver Middleware? #1196
Unanswered
drewgallagher
asked this question in
Q&A
Replies: 1 comment 7 replies
-
|
I don't quite understand what you're saying. What's the exact issue with the alias and the resolver middleware? Putting this aside, does the resolver middleware solve your problem? You can define it on the global level (config key: |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I want to create a middleware that runs only on our
publicschema so we can validate users' access to client data within a single file, as opposed to doing it per query/mutation's authorize method.From the docs and my experience so far, it appears that HTTP Middleware within Laravel can have an alias and you can assign that easily in the
middlewareproperty of thegraphql.phpfile.However for Resolver Middleware I haven't found a way to alias it so I can add it to that configuration array.
Is there a way to add an alias to the Resolver Middleware and take this approach, or is there an alternative way to do this?
I want to avoid using an HTTP Middleware because the GraphQL components haven't been parsed yet at the HTTP Middleware level, so it would require duplicate and complicated parsing to maintain security while extracting the args and performing the validation.
Beta Was this translation helpful? Give feedback.
All reactions