def only(fields, fields_with_base=nil)
      q = {}
      if [Array, String].include?(fields_with_base.class)
        fields_with_base = [fields_with_base] if fields_with_base.class == String
        q[fields.to_sym] = fields_with_base
      else
        fields = [fields] if fields.class == String
        q = {BASE: fields}
      end

      @query[:only] = q
      self
    end
def only(fields, fields_with_base=nil)
      q = {}
      if [Array, String].include?(fields_with_base.class)
        fields_with_base = [fields_with_base] if fields_with_base.class == String
        q[fields.to_sym] = fields_with_base
      else
        fields = [fields] if fields.class == String
        q = {BASE: fields}
      end

      @query[:only] = q
      self
    end
Specifies an array of 'only' keys in BASE object that would be 'included' in the response.

 @param [Array] fields Array of the 'only' reference keys to be included in response.
 @param [Array] fields_with_base Can be used to denote 'only' fields of the reference class

 Example
    # Include only title and description field in response
    @query = @stack.content_type('category').query
    @query.only(['title', 'description'])

    # Query product and include only the title and description from category reference
    @query = @stack.content_type('product').query
    @query.include_reference('category')
          .only('category', ['title', 'description'])

 @return [Contentstack::Query]