mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
12 lines
438 B
JavaScript
12 lines
438 B
JavaScript
import { VoteableCollections } from '../modules/make_voteable.js';
|
|
import { addToFragmentMatcher, addCallback } from 'meteor/vulcan:core';
|
|
|
|
function AddVoteableFragmentMatcher() {
|
|
addToFragmentMatcher({
|
|
kind: 'UNION',
|
|
name: 'Voteable',
|
|
possibleTypes: VoteableCollections.map(collection => ({name: collection.options.collectionName}))
|
|
});
|
|
return {};
|
|
}
|
|
addCallback('apolloclient.init.before', AddVoteableFragmentMatcher);
|