Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel

This commit is contained in:
SachaG 2018-01-27 13:12:03 +09:00
commit 9d3201ccb4
2 changed files with 4 additions and 6 deletions

View file

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
import { getSetting, getFragment, getFragmentName, Collections } from 'meteor/vulcan:core';
import { getSetting, getFragment, getFragmentName, getCollection } from 'meteor/vulcan:core';
export default function withDocument (options) {
@ -10,8 +10,7 @@ export default function withDocument (options) {
queryName = options.queryName || `${collection.options.collectionName}SingleQuery`,
singleResolverName = collection.options.resolvers.single && collection.options.resolvers.single.name;
const collection = options.collection
|| Collections.find(({ options: { collectionName: name }}) => name === collectionName );
const collection = options.collection || getCollection(collectionName);
let fragment;

View file

@ -38,7 +38,7 @@ import React, { Component } from 'react';
import { withApollo, graphql } from 'react-apollo';
import gql from 'graphql-tag';
import update from 'immutability-helper';
import { getSetting, getFragment, getFragmentName, Collections } from 'meteor/vulcan:core';
import { getSetting, getFragment, getFragmentName, getCollection } from 'meteor/vulcan:core';
import Mingo from 'mingo';
import compose from 'recompose/compose';
import withState from 'recompose/withState';
@ -56,8 +56,7 @@ const withList = (options) => {
extraQueries,
} = options;
const collection = options.collection
|| Collections.find(({ options: { collectionName: name }}) => name === collectionName );
const collection = options.collection || getCollection(collectionName);
const queryName = options.queryName || `${collection.options.collectionName}ListQuery`;
const listResolverName = collection.options.resolvers.list && collection.options.resolvers.list.name;