UNPKG

@wildcards/reason-apollo

Version:
35 lines (29 loc) 1.1 kB
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE import * as Caml_option from "bs-platform/lib/es6/caml_option.js"; import * as ApolloCacheInmemory from "apollo-cache-inmemory"; function createIntrospectionFragmentMatcher(data) { return new ApolloCacheInmemory.IntrospectionFragmentMatcher({ introspectionQueryResultData: data }); } function createInMemoryCache(dataIdFromObject, fragmentMatcher, cacheRedirects, addTypename, param) { var tmp = { }; if (dataIdFromObject !== undefined) { tmp.dataIdFromObject = Caml_option.valFromOption(dataIdFromObject); } if (cacheRedirects !== undefined) { tmp.cacheRedirects = Caml_option.valFromOption(cacheRedirects); } if (fragmentMatcher !== undefined) { tmp.fragmentMatcher = Caml_option.valFromOption(fragmentMatcher); } if (addTypename !== undefined) { tmp.addTypename = Caml_option.valFromOption(addTypename); } return new ApolloCacheInmemory.InMemoryCache(tmp); } export { createIntrospectionFragmentMatcher , createInMemoryCache , } /* apollo-cache-inmemory Not a pure module */