icgc-argo / platform-api

https://api.platform.icgc-argo.org/graphql
GNU Affero General Public License v3.0
0 stars 0 forks source link

Create HTTP Client and Related Resolver for Program Service Endpoints in Gateway - Part 2 #703

Open daniel-cy-lu opened 10 months ago

daniel-cy-lu commented 10 months ago
  1. Create a function in the httpClient to interact with the ProgramService for the given action.
  2. Update the gql resolver to use the httpClient function from step 1 instead of the GRPC client.

program service clients:

This ticket has part 1 and part 2

daniel-cy-lu commented 10 months ago

Clients with the the four unchecked boxes are using program service endpoint with bugs. Once those bugs are cleared, I can do some testing.

daniel-cy-lu commented 10 months ago

down to one last updateProgram endpoint which needs testing

daniel-cy-lu commented 10 months ago

For one endpoint, https://program-service.dev.argo.cancercollaboratory.org/swagger-ui/index.html#/program-controller/updateProgram (updateProgram), we couldn't get the testing done before the end of the year. There is some update needed in ProgramService and Azher has been working on it before he needs to leave for wisdom tooth extraction. So I am leaving my code in Plateform-API to accept the payload that is required for this endpoint, and once ProgramService is updated, the updateProgram http client should work.

{
  "program": {
    "shortName": "string",
    "description": "string",
    "name": "string",
    "website": "string",
    "commitmentDonors": 0,
    "submittedDonors": 0,
    "genomicDonors": 0,
    "membershipType": "string",
    "institutions": [
      "string"
    ],
    "countries": [
      "string"
    ],
    "cancerTypes": [
      "string"
    ],
    "primarySites": [
      "string"
    ],
    "dataCenter": {
      "id": "string",
      "shortName": "string",
      "name": "string",
      "uiUrl": "string",
      "gatewayUrl": "string"
    }
  }
}
daniel-cy-lu commented 10 months ago

Discover a bug in ProgramService endpoint, createProgram, https://program-service.dev.argo.cancercollaboratory.org/swagger-ui/index.html#/program-controller/createProgram. I believe it's caused by the addition of DataCenterId property to the payload of this endpoint.

demariadaniel commented 8 months ago

Working http queries for program, programs, dataCenters and programOptions Query details can be provided if needed

Screenshot 2024-02-01 at 10.41.06 AM.png Screenshot 2024-02-01 at 10.40.50 AM.png Screenshot 2024-02-01 at 10.40.40 AM.png Screenshot 2024-02-01 at 10.40.31 AM.png
demariadaniel commented 8 months ago

Successful updates for inviteUser, updateUser, removeUser Query details can be provided if needed

Screenshot 2024-02-01 at 11.49.44 AM.png Screenshot 2024-02-01 at 11.49.07 AM.png Screenshot 2024-02-01 at 11.48.54 AM.png
demariadaniel commented 8 months ago

Due to known issues w/ Program Service Create Program / Update Program, these resolvers will have to be tested once Program Service is updated

demariadaniel commented 8 months ago

PR: https://github.com/icgc-argo/platform-api/pull/694