Restaurant Search

The restaurantSearch query searches restaurants that match your query term, provided geolocation(lat, long), distance, price rate, and meals among others.

Pagination can be used if it is required to display a specific quantity of restaurants or a specific number per page.

Arguments

Argument

Type

Description

query

Query

Name or keyword of the restaurant name. It is possible to add more than one value. The query is case insensitive.

isOpen

Boolean

True if the restaurant is open

meals

meals

Name of the meal to include in the search criteria.

lat

Location

Latitude where the restaurant is located

long

Location

Longitud where the restaurant is located

distance

Int

Search radius in Kms (default is 1km), from the coordinates provided

Available Fields

Field

Type

Description

name

String

Name of the restaurant

isRecommended

String

Restaurant address

address1

String

Number of recommended restaurants

country

String

Name of the recommended restaurant

recommendation

String

Recommended menu item

recommendationsCount

Int

Number of recommendations given to the restaurant

cursor

String

pageInfo

Object that returns the information regarding pagination.

Example

Restaurant search by using a term and location

The following example retrieves the information of all first 15 open Mexican restaurants in a distance of 200km which serve meat.

{
  restaurantSearch(
    query:"Mexican Restaurant"
    distance: 100
    meals: "meat"
    isOpen:true
    first:15 ) 
  {
   totalCount  
edges
    {
      node{
        name
        shortName
        isRecomended
        address1
        cityTown
        country
        recommendation
        recommendationsCount
      }
      
    }
}
}

Restaurant search by using pagination

The following example retrieves the information of all first 10 open Mexican restaurants, it also indicates if there are more results available or if the connection was reached out by using the hasNextPage field. Continue the pagination using the endCursor

{
  restaurantSearch(
    query:"Mexican Restaurant"
    distance: 100
    meals: "meat"
    isOpen:true
    first:10 ) 
  {
   totalCount  
edges
    {
      node{
        name
        isRecomended
        address1
        cityTown
        country
        recommendation
        recommendationsCount
        databaseId
      }
      cursor
    }
     pageInfo {
      endCursor
      hasNextPage
    }
}
}

Last updated