icgc-argo / platform-api

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

bug/508 resolved null data issue #658

Closed daniel-cy-lu closed 1 year ago

daniel-cy-lu commented 1 year ago

Description of changes

Format response to resolve null returned data issue

Type of Change

Screenshots These fields, countries, institutions, regions, cancerTypes, primarySites no longer return null, instead returns it's value in an array of string. Screenshot 2023-05-09 at 10 42 21 AM

ciaranschutte commented 1 year ago

any reason you see to not change this to a .ts file? @joneubank this would have caught the error

daniel-cy-lu commented 1 year ago

@ciaranschutte @joneubank I found a bug related to GRPC endpoints (private field program query). It looks like there is no connection made. Or it should as me to authenticate my token right? membershipType and committedDonors are private fields. Screenshot 2023-05-10 at 11 34 08 AM

joneubank commented 1 year ago

@ciaranschutte @joneubank I found a bug related to GRPC endpoints (private field program query). It looks like there is no connection made. Or it should as me to authenticate my token right? membershipType and committedDonors are private fields.

This just looks like a connection issue on your local setup. Ideally, this would not attempt to fetch the data if you are not authorized... shouldn't be related to this ticket.

joneubank commented 1 year ago

any reason you see to not change this to a .ts file? @joneubank

This is a good idea in general. I'll review the file and see if there is anything concerning looking. Unfortunately I don't think it would catch the error. One of TS's blind spots is assuming that there is a value in the array when you use an index. ie. I don't think it will consider program.programCancers[0] as potentially undefined.

@daniel-cy-lu can you try updating this file to use typescript? If the transition is easy thats an easy win for us.

daniel-cy-lu commented 1 year ago

@ciaranschutte @joneubank I found a bug related to GRPC endpoints (private field program query). It looks like there is no connection made. Or it should as me to authenticate my token right? membershipType and committedDonors are private fields.

This just looks like a connection issue on your local setup. Ideally, this would not attempt to fetch the data if you are not authorized... shouldn't be related to this ticket.

Sorry my bad, I didn't have docker running. GRPC route is working now that I turned it on.