0

I am trying to apply restrictions on a graphQL schema on a Java application, based on domain. I would like the whole schema to be restricted to the domain "admin.org".

However, I also want to be able to expose any query or mutation to "user.org", by excluding the particular query or mutation from the global restriction.

The only way I found yet, is to restrict each query with the FIELD_DEFINITION directive. That is something I would like to avoid since I don't want to add a rule in every new query I add to the API.

  1. Is this possible to implement with GraphQL directives?
  2. If it is not, is there another way to accomplish the desired result?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.