buildQueryOptions = (options, { paginationTerms }, { terms }) => {
  let {
    pollInterval = getSetting('pollInterval', 20000),
    enableTotal = true,
    enableCache = false,
    // generic graphQL options
    queryOptions = {}
  } = options;
  // if this is the SSR process, set pollInterval to null
  // see https://github.com/apollographql/apollo-client/issues/1704#issuecomment-322995855
  pollInterval = typeof window === 'undefined' ? null : pollInterval;

  // get terms from options, then props, then pagination
  const mergedTerms = { ...options.terms, ...terms, ...paginationTerms };

  const graphQLOptions = {
    variables: {
      input: {
        terms: mergedTerms,
        enableCache,
        enableTotal,
      },
    },
    // note: pollInterval can be set to 0 to disable polling (20s by default)
    pollInterval,
  };

  if (options.fetchPolicy) {
    deprecate('1.13.3', 'use the "queryOptions" object to pass options to the underlying Apollo hooks (hook: useMulti, option: fetchPolicy)');
    graphQLOptions.fetchPolicy = options.fetchPolicy;
  }
  if (typeof options.pollInterval !== 'undefined') {
    deprecate('1.13.3', 'use the "queryOptions" object to pass options to the underlying Apollo hooks (hook: useMulti, option: pollInterval)');
  }
  // set to true if running into https://github.com/apollographql/apollo-client/issues/1186
  if (options.notifyOnNetworkStatusChange) {
    deprecate('1.13.3', 'use the "queryOptions" object to pass options to the underlying Apollo hooks (hook: useMulti, option: notifyOnNetworkStatusChange)');
    graphQLOptions.notifyOnNetworkStatusChange = options.notifyOnNetworkStatusChange;
  }

  // see https://www.apollographql.com/docs/react/features/error-handling/#error-policies
  graphQLOptions.errorPolicy = 'all';


  return {
    ...graphQLOptions,
    ...queryOptions // allow overriding options
  };
}
Build the graphQL query options
@param {*} options
@param {*} state
@param {*} props