Get Doctors
Overview
This section describes how to obtain a list of available doctors based on specialization and a given medical facility. Cursor-based pagination of results is also available. Below is an example query.
Query
token is not required - Authorization
query getDoctorsQuery(
  $insurerId: String!,
  $specializationId: String!,
  $medicalFacilityId: String!,
  $first: Int,
  $after: String,
) {
  doctors(
    insurerId: $insurerId,
    specializationId: $specializationId,
    medicalFacilityId: $medicalFacilityId,
    first: $first,
    after: $after,
  ) {
    pageInfo {
      hasNextPage
    }
    edges {
      cursor
      node {
        _id
        name
        degree
        medicalFacility {
          _id
          name
          address {
            city
            street
            houseNumber
          }
        }
      }
    }
  }
}
Response
{
  "pageInfo": {
      "hasNextPage": false,
      "__typename": "DoctorPageInfo"
  },
  "edges": [
    {
      "cursor": "MA==",
      "node": {
        "_id": "8244",
        "name": "Jan Kowalski",
        "degree": "",
        "medicalFacility": {
          "_id": "4e726ff1-42db-41a6-aab6-05e84085293d",
          "name": "Przychodnia24",
          "address": {
            "city": "Warszawa",
            "street": "Marynarska",
            "houseNumber": "33",
            "__typename": "Address"
          },
          "__typename": "MedicalFacility"
        },
        "__typename": "Doctor"
      },
      "__typename": "DoctorEdge"
    }
  ],
  "__typename": "DoctorConnection"
}