How to count documents in a collection by a collection Id?

The below is my schema.graphql.js config file.

I got “Cast to ObjectId failed for value “{ id: ‘y57uifhu3grur3rhuihurg3ugr3’ }” at path “categories” for model “movies””" when using this query:
query {
moviesCount(where: { categories: {id: “y57uifhu3grur3rhuihurg3ugr3”} }) => :x:
}
query {
moviesCount(where: {id: “y57uifhu3grur3rhuihurg3ugr3”} ) => :white_check_mark:
}

Sorry, my bad in English.