mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
13 lines
438 B
JavaScript
13 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);
|