collection.addField not working if schema is simpl-schema
EloyID opened this issue · comments
EloyID commented
Describe the bug
If I create a collection using a schema which is instance of simpl-schema and then I use addField, it won't appear in GraphQL
To Reproduce
Steps to reproduce the behavior:
- Create a collection using simpl-schema in the schema
- Use collection.addField
- Try to query/filter by this field
Expected behavior
The field to exist
Erik Dakoda commented
Try this:
collection.attachSchema({
addedField1: {
type: Boolean,
. . .
},
addedField2: {
type: Object,
. . .
},
});
EloyID commented
It's already in the addField function and it used to work in the release of november
Vulcan/packages/vulcan-lib/lib/modules/collections.js
Lines 76 to 89 in f5012d1
Erik Dakoda commented