I have a schema for a collection:
{
"required": [
"name"
],
"properties": {
"_id": {
"bsonType": "objectId"
},
"name": {
"bsonType": "string",
"minLength": 5
}
},
"title": "common.location"
}
When I run the validation on existing data, it works. When I insert data without a name, it gives me a validation error back. When I insert data with less than 5 characters, it still inserts. Does the schema do anything on insert or update? Especially from either mongodb or graphql?