Open EloyID opened 3 years ago
Try this:
collection.attachSchema({
addedField1: {
type: Boolean,
. . .
},
addedField2: {
type: Object,
. . .
},
});
It's already in the addField function and it used to work in the release of november https://github.com/VulcanJS/Vulcan/blob/f5012d16ab272c753efbc159ca44fb829f362f46/packages/vulcan-lib/lib/modules/collections.js#L76-L89
@EloyID there is a bug in addField
that I attempted to fix with a PR but the change was reverted by @SachaG. Here is our discussion about it: https://github.com/VulcanJS/Vulcan/pull/2648 . My solution above is the workaround I am using.
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:
Expected behavior The field to exist