Upfront sorry for raising this here as this may be coding error, but I am not getting any help on meteor forum or on stackoverflow.
Im using package cultofcoders:grapher, when I’m trying to link two collections Im getting error -
Error: Could not find a collection with the name: Products [invalid-collection]
at Linker._validateAndClean (packages/cultofcoders:grapher/lib/links/linker.js:159:23)
Below is my code
products/collection.js
import {Mongo} from "meteor/mongo";
import ProductSchema from "./schema"
const Products = new Mongo.Collection("products");
Products.attachSchema(ProductSchema);
Products.attachBehaviour("timestampable");
export default Products;
products/link.js
import Products from "./collection";
import Categories from "../categories/collection";
Products.addLinks({
productsCategory:{
type: "one",
collection: "Categories",
field: "category"
}
});
Upfront sorry for raising this here as this may be coding error, but I am not getting any help on meteor forum or on stackoverflow.
Im using package cultofcoders:grapher, when I’m trying to link two collections Im getting error -
Below is my code
products/collection.js
products/link.js
complete repo can be found at https://github.com/chidugit/publicapp/tree/master/shoppingcart
No error is triggered when attaching schema, but why is there an error when I am trying to add links? WHat am I missing here?