Our PuppetDB query examples that show how to filter based on class name are inconsistent, and in some cases wrong. Any time you need to filter on a class name, that name should have the first letter of each name-space be capitalized.
For example, this snippet: https://docs.puppet.com/puppetdb/4.3/api/query/examples-pql.html#fact-and-resource-filtering-for-classes
The example for apache is wrong because you must actually search for Apache.
For some reason, all classes stored inside PuppetDB are represented with a capital first letter, so when you need to search for one, you must match the case.
Filtering on a role for example would look like this: