Skip to content

Latest commit

 

History

History
67 lines (56 loc) · 1.45 KB

offering-search-filter-options.adoc

File metadata and controls

67 lines (56 loc) · 1.45 KB

Offering Search FilterOptions

Query to look for existing options to search for courses. Returns a list of all schools (campuses), categories and googleplaces ids (cities, countries) thahave at least one course avilable

offeringSearchFilterOptions.gql
query  {
  offeringSearchFilterOptions(filter: OfferingSearchFilterOptionsFilter){
    # OfferingSearchFilterOptionsResult
  }
}
Note
The query doesn’t have arguments other than schoolIds and doesn’t have pagination.

Example to get locations

The following query will return all locations where a course is offered. You can change locations name by sending a different languageId

offeringSearchFilterOptionsForLocation.gql
query offeringSearchFilterOptionsForLocation($languageId: Int) {
  offeringSearchFilterOptions {
    schoolGooglePlaces {
      googlePlaceId
      countryId
      cityName: translation(languageId: $languageId)
      country {
        countryName: nameTranslation(languageId: $languageId)
      }
    }
  }
}
Variables
{
    "languageId": 1
}

Example to get schools (campuses)

Yu can also look for schools

offeringSearchFilterOptionsForSchools.gql
query offeringSearchFilterOptionsForSchools {
  offeringSearchFilterOptions {
    schools{
      name
      schoolId
      schoolCompany{
        schoolCompanyId
        name
      }
    }
  }
}