buildQueryOptions = (options, { documentId, slug, selector = { documentId, slug } }) => {
  let { pollInterval = getSetting('pollInterval', 20000), enableCache = false, fetchPolicy, 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;

  // OpenCrud backwards compatibility
  const graphQLOptions = {
    variables: {
      input: {
        selector,
        enableCache
      }
    },
    pollInterval // note: pollInterval can be set to 0 to disable polling (20s by default)
  };

  if (fetchPolicy) {
    deprecate('1.13.3', 'use the "queryOptions" object to pass options to the underlying Apollo hooks (hook: useSingle, option: fetchPolicy)');
    graphQLOptions.fetchPolicy = 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)');
  }

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

  return {
    ...graphQLOptions,
    ...queryOptions
  };
}
Create GraphQL useQuery options and variables based on props and provided options
@param {*} options 
@param {*} props