We use Apollo Studio to capture perf metrics of our Apollo Server Federated GraphQL application.
I am noticing that we are getting lots of noise in the Operations > Errors. The errors that are creating the noise are when we throw if (!authData) return new AuthenticationError("Unauthorized.");
when checking if a use has AuthZ role required to access certain fields or mutations in our Federated Graph schema.
I am wondering two things:
- Are there any error handling patterns that you can recommend to me for handling AuthZ in our Federated Graph?
- Is there a way to filter by Error type or message in Apollo Studio on the Operations > Errors view?