Stumbled across this bug recently on Sitecore 9.1 with Sitecore JSS 12. while trying to use the Content Search Api.

GraphQL.ExecutionError: Error trying to resolve search. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Sitecore.Services.GraphQL.Content.Queries.SearchQuery.Resolve(ResolveFieldContext context)
   at GraphQL.Resolvers.FuncFieldResolver`1.GraphQL.Resolvers.IFieldResolver.Resolve(ResolveFieldContext context)
   at GraphQL.Execution.ExecutionStrategy.<ExecuteNodeAsync>d__7.MoveNext()

Solution: Pass in a value for fieldsEqual parameter. Example query below:

{
  search(
    fieldsEqual:[{name:"_fullpath", value:"/sitecore/content/home*" }]
    	facetOn:["contenttype", "category"]
  		first: 5
  		after: "0") {
    facets {
      name
      values {
        value
        count
      }
    }
    results {
      items {
        item {
          name
          path
          url
        }
      }
    }
    results {
      totalCount
      pageInfo {
        hasNextPage
        hasPreviousPage
      }
    }
  }
}