def query
      q = @root.clone

      # Navigation paths come first in the query
      q << "/#{@navigation_paths.join("/")}" unless @navigation_paths.empty?

      # Handle links queries, this isn't just a standard query option
      q << "/$links/#{@links_navigation_property}" if @links_navigation_property

      # Handle count queries, this isn't just a standard query option
      q << "/$count" if @count
      query_options = generate_query_options

      q << "?#{query_options.join('&')}" if !query_options.empty?
      q
    end
def query
      q = @root.clone

      # Navigation paths come first in the query
      q << "/#{@navigation_paths.join("/")}" unless @navigation_paths.empty?

      # Handle links queries, this isn't just a standard query option
      q << "/$links/#{@links_navigation_property}" if @links_navigation_property

      # Handle count queries, this isn't just a standard query option
      q << "/$count" if @count
      query_options = generate_query_options

      q << "?#{query_options.join('&')}" if !query_options.empty?
      q
    end
Builds the query URI (path, not including root) incorporating expands, filters, etc.
 This is used internally when the execute method is called on the service