I have a mongoose schema like this:
var MoviesSchema = new mongoose.Schema({
name: String,
collections: [String]
});
var Movie = mongoose.model('Movie', MovieSchema);
I'm using graphiti
to generate the graphql schema automatically. I'm able to query the data using name
, however I'm unable to query using collections
since the type is an array.
For instance, this works:
{
movies(name: "Kabali") {
name,
collection
}
}
however this doesn't work:
{
movies(collection: "Hollywood") {
name,
collection
}
}
Actually, the movies field doesn't even have the argument called collection
.