ourjapanlife / findadoc-server

The api / server for Find A Doc, Japan. Check out the board to see the latest effort https://github.com/orgs/ourjapanlife/projects/8
4 stars 1 forks source link

fix: Make facility email field nullable #437

Closed evan-desu closed 7 months ago

evan-desu commented 8 months ago

Previously we had placeholder email addresses in our database that we did not want to display in our SearchResultDetails component. This PR updates the GraphQL schema to to make facility email addresses nullable.

Part of #436

What changed

Remove non-nullable operator ! from GraphQL Contact type and ContactInput.

Testing instructions

Run npm run dev, navigate to http://127.0.0.1:4000/, and run the following mutation: Operation

mutation Mutation($input: CreateFacilityInput!) {
  createFacility(input: $input) {
    id
    nameEn
    contact {
      email
    }
    createdDate
    updatedDate
  }
}

Variables

{
  "input": {
    "contact": {
      "address": {
        "addressLine1En": "test",
        "addressLine1Ja": "テスト",
        "addressLine2En": "5555-55 test",
        "addressLine2Ja": "テスト5555-55",
        "cityEn": "test",
        "cityJa": "テスト",
        "postalCode": "123-0000",
        "prefectureEn": "test",
        "prefectureJa": "テスト"
      },
      //"email": null,
      "googleMapsUrl": "www.test.com",
      "phone": "080-1234-5678",
    },
    "healthcareProfessionalIds": "12345678",
    "mapLatitude": 1234,
    "mapLongitude": 5678,
    "nameEn": "Dr. test",
    "nameJa": "テスト先生"
  }
}

The response should include the field "email": null.

ermish commented 7 months ago

^ go ahead and merge when you're ready to verify it in prod @evan-desu