icgc-argo / roadmap

Place to review/request new features and new tools on ICGC-ARGO's roadmap
1 stars 0 forks source link

gql `clinicalData` query not returning results #1115

Closed ciaranschutte closed 4 months ago

ciaranschutte commented 7 months ago

clinicalData gql query not returning results

possible source of issue is here in the mongoose filtering: https://github.com/icgc-argo/argo-clinical/blob/develop/src/clinical/donor-repo.ts#L256

    const result = await DonorModel.paginate(
      {
        programId,
        ...completionState,
        ...searchQuery,
      },
      {
        projection,
        sort,
        page,
        limit,
      },
    );

completionState is being spread but it's a string resulting in {0: 'a', 1:'l', 2:'l'}

Screenshot 2024-02-16 at 2.19.00 AM.png Screenshot 2024-02-16 at 3.28.10 AM.png
demariadaniel commented 7 months ago

See ClinicalApi: https://github.com/icgc-argo/argo-clinical/blob/develop/src/clinical/api/clinical-api.ts#L204

CompletionState string sent by API is then used to access a key on completionFilters which yields an object Obviously something is not connected right however based on the Mongoose.find() screenshot

Assuming this is RDPC UI -> RDPC Gateway? Starting point to review is clinicalData resolver at: https://github.com/icgc-argo/argo-clinical/blob/develop/src/schemas/clinical-resolvers/clinicalData.ts

demariadaniel commented 7 months ago

Two additional bugs addressed in PR: