mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel
This commit is contained in:
commit
9d3201ccb4
2 changed files with 4 additions and 6 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue