grapher/lib/query/testing/bootstrap/comments/links.js

19 lines
386 B
JavaScript
Raw Normal View History

import Comments from './collection.js';
import Authors from '../authors/collection.js';
import Posts from '../posts/collection.js';
Comments.addLinks({
author: {
type: 'one',
collection: Authors,
field: 'authorId',
index: true
},
post: {
type: 'one',
collection: Posts,
field: 'postId',
index: true
}
});