Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Submission type and input #208

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

evan-desu
Copy link
Contributor

@evan-desu evan-desu commented Aug 7, 2023

The reason for this change is to allow users to submit incomplete information to be reviewed by moderators prior to being searchable on the website

Resolves #202

What changed

  1. Added a type called Submission and an input called SubmissionInput.
  2. Added submissions and submission to type Query.

Testing instructions

  1. Run yarn dev and navigate to localhost:3001 to open the Apollo Server Playground.
  2. In the left pane under Query, click the + next to submission, then id: ID!.
  3. In the middle pane, under Variables, replace the value of "submissionId": null with an id, i.e. "1", then click the blue Submission button.
  4. A Status 200 in the right pane means the query for a single submission was a success.
  5. To query for all submissions, click Query in the left pane, then click the + next to submissions, then id: ID!.
  6. Click the blue Query button in the middle pane.
  7. A Status 200 in the right pane means the query for all submissions was a success.

The reason for this change is to allow users to submit incomplete information to be reviewed by moderators prior to being searchable on the website
@evan-desu evan-desu marked this pull request as ready for review August 8, 2023 02:08
id: ID!
submittedLink: String!
healthCareProfessionalName: String!
spokenLanguages: [SpokenLanguage]!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ermish We might want to let Submission have a list of strings for spokenLanguages in case users want to submit doctors that speak languages not included in the enum (even if search only allows EN/JP for MVP). Thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm I think we should stick with the enum. we could always put other...but I think that will cause more problems than we solve.

We can always add more languages to the enum now even if we don't do anything with them.

@evan-desu evan-desu force-pushed the feat/graphql-submissions-schema branch from df42cf4 to 65b2bc9 Compare August 8, 2023 06:14
@theyokohamalife theyokohamalife self-requested a review August 8, 2023 08:52
@theyokohamalife theyokohamalife merged commit c259d3c into main Aug 8, 2023
8 checks passed
@theyokohamalife theyokohamalife deleted the feat/graphql-submissions-schema branch August 8, 2023 08:52
@theyokohamalife
Copy link
Collaborator

@all-contributors please add @evan-desu for code

@allcontributors
Copy link

@theyokohamalife

We had trouble processing your request. Please try again later.

@theyokohamalife
Copy link
Collaborator

@all-contributors please add @evan-desu for code

@allcontributors
Copy link

@theyokohamalife

We had trouble processing your request. Please try again later.

ermish pushed a commit that referenced this pull request Aug 28, 2023
The reason for this change is to allow users to submit incomplete information to be reviewed by moderators prior to being searchable on the website
theyokohamalife added a commit that referenced this pull request Aug 29, 2023
* progress

* fix(deps): update dependency firebase-admin to v11.6.0 (#182)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* got build and queries working again! (#181)

* fix(deps): update dependency csv-parse to v5.3.8 (#183)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Philip Ermish <[email protected]>

* chore(deps): update yarn to v3.5.1 (#190)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Philip Ermish <[email protected]>

* fix(deps): update dependency @apollo/server to v4.7.0 (#185)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency eslint to v8.40.0 (#179)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LaShawn Toyoda <[email protected]>

* chore(deps): update dependency firebase-tools to v11.28.0 (#184)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LaShawn Toyoda <[email protected]>

* fix(deps): update dependency firebase to v9.22.0 (#186)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LaShawn Toyoda <[email protected]>

* chore(deps): update typescript-eslint monorepo to v5.62.0 (#187)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency @types/chai to v4.3.5 (#188)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency all-contributors-cli to v6.26.1 (#189)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency csv-parse to v5.4.0 (#193)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: add firebase service account key to env variable (#204)

* fix: add firebase service account key to env variable

Prior to this change, a new developer starting server would get an error message saying private key is missing. Installed dotenv to handle environment variables in the code. Updated README with instructions on how to get a private key from firebase and how to add it to the local env file.

* docs: Add instructions for setting up Firebase Service Account

* chore(deps): update graphqlcodegenerator monorepo to v4 (#194)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency node to v18.17.0 (#197)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency firebase to v10 (#210)

* chore(deps): update dependency firebase-tools to v12 (#192)

* feat: add Submission type and input (#208)

The reason for this change is to allow users to submit incomplete information to be reviewed by moderators prior to being searchable on the website

* feat: add mutations for addFacility and addHealthcareProfessional (#203)

* feat: implement mutation for addFacility

* feat: implement mutation for addHealthcareProfessional

* refactor: fix healthcareProfessionalService types

* refactor: fix types and move function

* chore(deps): update reviewdog/action-eslint action to v1.19.2 (#205)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Remove codeowners until the repo goes public (#228)

* chore: set renovate confidence to high (#215)

Co-authored-by: Philip Ermish <[email protected]>

* Refactor FacilityService and HealthcareProfessionalService (#223)

* chore: update healthcareProfessional service

* feat: add new Facility with HealthcareProfessional Ids

* refactor: clean up imports

* feat: add the isDeleted field to Facility and HealthcareProfessional

* chore(deps): update node.js to v18.17.1 (#216)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LaShawn Toyoda <[email protected]>

* chore(deps): update dependency @graphql-codegen/cli to v5 (#217)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LaShawn Toyoda <[email protected]>

* 👥 Add @evan-desu as a contributor (#231)

* feat: add a submissionService file and Submission type definitions (#213)

Previously there were no service functions to allow users to get, add, or update submissions. There are now functions to perform these tasks. There is now also a Submission type alias in TypeDefs/dbschema.ts

* feat: add a submissionService file and Submission type definitions (#218)

* feat: implement end-to-end testing with Jest and Supertest (#227)

* feat: implement end-to-end testing with Jest and Supertest

Prior to this commit the tests that were in place were legacy tests for when our tech stack included Prisma and Postgres. Now that we're using Firestore they're no longer needed.

* feat: add GitHub action to run tests

* feat: add mock firebase config for jest

Co-authored-by: Anissa Chadouli [email protected]

* docs: update testing instructions

* test: happy path is successful

* refactor: separate env variables for dev and prod

Co-authored-by: Philip Ermish <[email protected]>

* chore: fix docker in github actions

Co-authored-by: Philip Ermish <[email protected]>

* chore: fix docker in github actions

Co-authored-by: Philip Ermish <[email protected]>

* chore: fix yarn path

Co-authored-by: Philip Ermish <[email protected]>

* chore: check in dev and prod env

Co-authored-by: Philip Ermish <[email protected]>

* Update README.md

* Update __tests__/server.test.ts

* Update src/index.ts

---------

Co-authored-by: Philip Ermish <[email protected]>

* upgraded to node 20 and relevant packages

* got build working!

* merge fixes. build works again

* commenting out in progress workflows

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LaShawn Toyoda <[email protected]>
Co-authored-by: Evan Peterson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Submission to the GraphQL Schema
3 participants