icgc-argo / platform-api

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

Feat/674 rest api integration #677

Closed daniel-cy-lu closed 8 months ago

daniel-cy-lu commented 9 months ago

Create clients using HTTP to retrieve data from Program Service endpoints. The next step would be to use these new HTTP in place of the existing GRPC clients

Create clients for getPrivateProgram, listPrivatePrograms, and getPublicProgram. Tested in localhost Playground and all three clients successfully retrieved data from Program Service.

Type of Change

users is not implement in this PR. listUsers is done in the next PR.

# users {
#   email
#   firstName
#   lastName
#   role
#   isDacoApproved
#   inviteStatus
#   inviteAcceptedAt
# }

} }

3.

{ program(shortName: "DEMO-CA") { shortName description name website institutions countries regions cancerTypes primarySites } }

4.

{ joinProgramInvite(id: "503b60a2-ea97-420f-9a48-8b93b9980d5d") { id createdAt expiresAt acceptedAt program { shortName description name website institutions countries cancerTypes primarySites commitmentDonors submittedDonors genomicDonors } user { email

first and last name has to be updated in Program Service. Right now they return null

  # firstName
  # lastName
  role
}
emailSent
status

} }


Note: use bearer authorization for the private queries. The difference 1 and 3 is 3 doesn't have access to private fields such as commitmentDonors, submittedDonors etc. The following is an example of bearer authorization:

{"Authorization":"Bearer ${jwt token}"}

daniel-cy-lu commented 9 months ago

@joneubank does the new error handler apply to all the other http fetchs?

daniel-cy-lu commented 9 months ago

In joinProgramInvite, if first and lastName have no issues, a screenshot of the query:

Screenshot 2023-10-16 at 11 37 26 AM

daniel-cy-lu commented 8 months ago

@joneubank Jon, I checked off the two on the list you provided this morning. Thanks for the feedbacks!

daniel-cy-lu commented 8 months ago

@joneubank Thanks Jon!! SO MUCH!

Buwujiu commented 8 months ago

@daniel-cy-lu pls make a new ticekt for this PR.

daniel-cy-lu commented 8 months ago

@Buwujiu ticket #702 is created and attached for this PR. The PR is unattached to the epic.