neo4j-graphql-js
neo4j-graphql-js copied to clipboard
Selective auth for autogenerated queries and mutations
I may be missing something obvious, but I can't seem to find a way in the examples or docs to allow anonymous access to autogenerated queries or mutations.
I am trying to use authorization schema directives by enabling auth in makeAugmentedSchema as per the docs: https://grandstack.io/docs/neo4j-graphql-js-api.html#makeaugmentedschemaoptions-graphqlschema
Now for queries and mutations I define in my typeDefs I still can have unauthenticated queries or mutations if I leave out the isAuthenticated directive, however calling any autogenerated query gives me a "AuthorizationError: No authorization token." error.
What I need is to be able to enforce authentication, scope, and role presence on some autogenerated queries/mutations but not others, possibly via an exclude property in the auth part of the config object similar to that supplied to query and mutation?
P.S. Thank you for the awesome project!
Good question. What's the status on this now?
https://github.com/neo4j-graphql/neo4j-graphql-js/issues/608