code: def get_query(self):
          
  
          query = super(ExpandableViewMixin, self).get_query()
          expandable_fields = getattr(self, 'expandable_fields', [])
  
          if expandable_fields:
              requested_expands = parse_requested_expands(self.schema_class.QUERY_KEY, self.request)
  
              if requested_expands:
                  available_expands = self.expandable_fields.keys()
  
                  for name in requested_expands:
                      if name in available_expands:
                          field = self.expandable_fields[name]
  
                          innerjoin = field.get('join')
                          outerjoin = field.get('outerjoin')
  
                          if innerjoin:
                              query = query.join(innerjoin)
                          elif outerjoin:
                              query = query.outerjoin(outerjoin)
  
                          # Apply optional options
                          options = field.get('options')
  
                          if options:
                              query = query.options(*options)
  
          return query
docs: If you override this method do not forget to call ``super()``.