mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
19 lines
411 B
JavaScript
19 lines
411 B
JavaScript
![]() |
import { IntrospectionFragmentMatcher } from 'react-apollo';
|
||
|
|
||
|
export const FragmentMatcher = [];
|
||
|
|
||
|
export const addToFragmentMatcher = fragmentMatcher => {
|
||
|
FragmentMatcher.push(fragmentMatcher);
|
||
|
}
|
||
|
|
||
|
export const getFragmentMatcher = () => {
|
||
|
const fm = {
|
||
|
introspectionQueryResultData: {
|
||
|
__schema: {
|
||
|
types: FragmentMatcher,
|
||
|
},
|
||
|
}
|
||
|
};
|
||
|
return new IntrospectionFragmentMatcher(fm);
|
||
|
}
|