code: function handleSubcollections(ref, subcollectionList) {
    if (subcollectionList) {
      forEach(subcollectionList, subcollection => {
        /* eslint-disable no-param-reassign */
        if (subcollection.collection) {
          if (!isFunction(ref.collection)) {
            throw new Error(
              `Collection can only be run on a document. Check that query config for subcollection: "${
                subcollection.collection
              }" contains a doc parameter.`,
            );
          }
          ref = ref.collection(subcollection.collection);
        }
        if (subcollection.doc) ref = ref.doc(subcollection.doc);
        if (subcollection.where) ref = addWhereToRef(ref, subcollection.where);
        if (subcollection.orderBy) {
          ref = addOrderByToRef(ref, subcollection.orderBy);
        }
        if (subcollection.limit) ref = ref.limit(subcollection.limit);
        if (subcollection.startAt) ref = ref.startAt(subcollection.startAt);
        if (subcollection.startAfter) {
          ref = ref.startAfter(subcollection.startAfter);
        }
        if (subcollection.endAt) ref = ref.endAt(subcollection.endAt);
        if (subcollection.endBefore) ref = ref.endBefore(subcollection.endBefore);
  
        ref = handleSubcollections(ref, subcollection.subcollections);
        /* eslint-enable */
      });
    }
    return ref;
  }
docs: Call methods on ref object for provided subcollection list (from queryConfig
  object)
  @param  {firebase.firestore.CollectionReference} ref - reference on which
  to call methods to apply queryConfig
  @param  {Array} subcollectionList - List of subcollection settings from
  queryConfig object
  @return {firebase.firestore.Query} Query object referencing path within
  firestore