Skip to content

Commit

Permalink
feat: CQDG-000 version 2 0 14
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulous committed Jul 9, 2024
1 parent 2b6e9d4 commit c4a3448
Show file tree
Hide file tree
Showing 7 changed files with 293 additions and 192 deletions.
442 changes: 263 additions & 179 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cqdg-wrapper-next",
"version": "2.0.13",
"version": "2.0.14",
"description": ":factory: a data-model aware GraphQL API that sits above an Elasticsearch cluster",
"main": "src/index.js",
"type": "module",
Expand Down
6 changes: 3 additions & 3 deletions src/graphql/biospecimen/types/biospecimen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import GraphQLJSON from '@ferlab/next/lib/common/types/jsonType';
import { GraphQLInt, GraphQLList, GraphQLObjectType, GraphQLString } from 'graphql';

import { esBiospecimenIndex } from '#src/config/env';
import { FilesType } from '#src/graphql/file/types/file';
import { ParticipantType } from '#src/graphql/participant/types/participant';
import { StudyType } from '#src/graphql/study/types/study';

import { FilesType } from '../../file/types/file';
import { ParticipantType } from '../../participant/types/participant';
import { StudyType } from '../../study/types/study';
import extendedMapping from '../extendedMapping';
import BiospecimenAgg from './biospecimenAgg';

Expand Down
25 changes: 22 additions & 3 deletions src/graphql/file/types/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import GraphQLJSON from '@ferlab/next/lib/common/types/jsonType';
import { GraphQLBoolean, GraphQLFloat, GraphQLInt, GraphQLList, GraphQLObjectType, GraphQLString } from 'graphql';

import { esFileIndex } from '#src/config/env';
import { BiospecimensType, BiospecimenType } from '#src/graphql/biospecimen/types/biospecimen';
import { ParticipantsType, ParticipantType } from '#src/graphql/participant/types/participant';
import { BiospecimensType } from '#src/graphql/biospecimen/types/biospecimen';
import { ParticipantsType } from '#src/graphql/participant/types/participant';
import { StudyType } from '#src/graphql/study/types/study';

import extendedMapping from '../extendedMapping';
Expand Down Expand Up @@ -50,7 +50,26 @@ export const FileType = new GraphQLObjectType({
sequencing_experiment: { type: SequencingExperimentType },
}),
extensions: {
nestedFields: ['participants', ...ParticipantType.extensions.nestedFields, 'biospecimens', 'biospecimens.files'],
nestedFields: [
'biospecimens',
'biospecimens.participant.diagnoses',
'biospecimens.participant.family_relationships',
'biospecimens.participant.icd_tagged',
'biospecimens.participant.mondo',
'biospecimens.participant.mondo_tagged',
'biospecimens.participant.observed_phenotype_tagged',
'biospecimens.participant.observed_phenotypes',
'participants',
'participants.biospecimens',
'participants.diagnoses',
'participants.familyRelationships',
'participants.icd_tagged',
'participants.mondo',
'participants.mondo_tagged',
'participants.observed_phenotype_tagged',
'participants.observed_phenotypes',
'participants.phenotypes_tagged',
],
esIndex: esFileIndex,
},
});
Expand Down
6 changes: 3 additions & 3 deletions src/graphql/participant/types/participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import GraphQLJSON from '@ferlab/next/lib/common/types/jsonType';
import { GraphQLBoolean, GraphQLEnumType, GraphQLInt, GraphQLList, GraphQLObjectType, GraphQLString } from 'graphql';

import { esParticipantIndex } from '#src/config/env';
import { BiospecimensType } from '#src/graphql/biospecimen/types/biospecimen';
import { FilesType } from '#src/graphql/file/types/file';
import { StudyType } from '#src/graphql/study/types/study';

import { BiospecimensType } from '../../biospecimen/types/biospecimen';
import { FilesType } from '../../file/types/file';
import { StudyType } from '../../study/types/study';
import extendedMapping from '../extendedMapping';
import DiagnosesType from './diagnoses';
import FamilyRelationshipsType from './familyRelationships';
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/study/types/study.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import GraphQLJSON from '@ferlab/next/lib/common/types/jsonType';
import { GraphQLBoolean, GraphQLFloat, GraphQLInt, GraphQLList, GraphQLObjectType, GraphQLString } from 'graphql';

import { esStudyIndex } from '#src/config/env';
import DataSetsType from '#src/graphql/file/types/dataSets';

import DataSetsType from '../../file/types/dataSets';
import extendedMapping from '../extendedMapping';
import DataCategoriesType from './dataCategories';
import DataTypesType from './dataTypes';
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import keycloakConfig from './config/keycloak';
import schema from './graphql/schema';
import esClient from './services/elasticsearch/client';

console.log(devMode);

const startApp = async () => {
try {
const keycloak = new Keycloak({}, keycloakConfig);
Expand Down

0 comments on commit c4a3448

Please sign in to comment.