From 5efa7797ce67ed7d398d0c9bd3e8fa6b0cbfdcc8 Mon Sep 17 00:00:00 2001 From: William Cheung <83677809+wvxcheung@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:57:24 -0500 Subject: [PATCH] feat!: update schema to ODM v2 (#39) Fixes [AB#5395](https://dev.azure.com/HCPHAC/5346c868-3a60-4f97-aa76-49dc2380e734/_workitems/edit/5395) --- graphql/api/relationships.ts | 81 ++++--- graphql/auth.ts | 4 +- graphql/resolvers.ts | 221 +++++++++--------- graphql/schema/Infobase.graphql | 4 +- graphql/schema/InfobaseTrend.graphql | 4 +- graphql/schema/StandardCurve.graphql | 2 +- graphql/schema/addresses.graphql | 27 --- graphql/schema/allSites.graphql | 10 +- graphql/schema/allSitesAdj.graphql | 10 +- graphql/schema/contacts.graphql | 28 --- graphql/schema/countries.graphql | 41 ++++ graphql/schema/datasets.graphql | 24 +- graphql/schema/instruments.graphql | 31 --- ...{languageLUs.graphql => languages.graphql} | 17 +- graphql/schema/measureSets.graphql | 15 -- graphql/schema/measures.graphql | 105 +++++---- graphql/schema/methodSets.graphql | 25 -- graphql/schema/methodSteps.graphql | 47 ---- graphql/schema/organizations.graphql | 22 -- graphql/schema/partLUs.graphql | 145 ------------ graphql/schema/parts.graphql | 205 ++++++++++++++++ graphql/schema/polygons.graphql | 32 --- graphql/schema/qualityReports.graphql | 25 ++ graphql/schema/samples.graphql | 40 ++-- .../schema/{setLUs.graphql => sets.graphql} | 22 +- graphql/schema/sites.graphql | 42 ++-- graphql/schema/translationLUs.graphql | 21 -- graphql/schema/translations.graphql | 25 ++ graphql/schema/zones.graphql | 16 ++ host.json | 3 +- 30 files changed, 627 insertions(+), 667 deletions(-) delete mode 100644 graphql/schema/addresses.graphql delete mode 100644 graphql/schema/contacts.graphql create mode 100644 graphql/schema/countries.graphql delete mode 100644 graphql/schema/instruments.graphql rename graphql/schema/{languageLUs.graphql => languages.graphql} (66%) delete mode 100644 graphql/schema/measureSets.graphql delete mode 100644 graphql/schema/methodSets.graphql delete mode 100644 graphql/schema/methodSteps.graphql delete mode 100644 graphql/schema/organizations.graphql delete mode 100644 graphql/schema/partLUs.graphql create mode 100644 graphql/schema/parts.graphql delete mode 100644 graphql/schema/polygons.graphql create mode 100644 graphql/schema/qualityReports.graphql rename graphql/schema/{setLUs.graphql => sets.graphql} (52%) delete mode 100644 graphql/schema/translationLUs.graphql create mode 100644 graphql/schema/translations.graphql create mode 100644 graphql/schema/zones.graphql diff --git a/graphql/api/relationships.ts b/graphql/api/relationships.ts index 74dd5ff..daa7a8c 100644 --- a/graphql/api/relationships.ts +++ b/graphql/api/relationships.ts @@ -13,18 +13,21 @@ import { TableRelationships } from './types'; * "InfobaseTrend", * "polygons", * "instruments", - * "setLUs", - * "partLUs", + * "sets", + * "parts", * "contacts", * "measureSets", * "methodSteps", * "methodSets", - * "languageLUs", - * "translationLUs", + * "languages", + * "translations", * "sites", * "samples", - * "measures" - * "StandardCurve" + * "measures", + * "StandardCurve", + * "countries", + * "zones" + * * ]} */ export const tables = [ @@ -37,18 +40,21 @@ export const tables = [ 'InfobaseTrend', 'polygons', 'instruments', - 'setLUs', - 'partLUs', + 'sets', + 'parts', 'contacts', 'measureSets', 'methodSteps', 'methodSets', - 'languageLUs', - 'translationLUs', + 'languages', + 'translations', 'sites', 'samples', 'measures', + 'qualityReports', 'StandardCurve', + 'countries', + 'zones' ] as const; /** @@ -80,14 +86,14 @@ export const tableRelationships: TableRelationships = { }, { table: 'datasets', - foreignKeys: 'dataID', + foreignKeys: 'datasetID', auth: { depth: 1, required: true }, }, { table: 'methodSets', foreignKeys: 'mSRID' }, { table: 'contacts', foreignKeys: 'contID' }, { table: 'measures', foreignKeys: ['sampleID', 'sampID'] }, { table: 'samples', foreignKeys: ['sampID', 'parSampID'] }, - { table: 'partLUs', foreignKeys: ['partID', 'purposeID'] }, + { table: 'parts', foreignKeys: ['partID', 'purposeID'] }, ], measures: [ { @@ -97,7 +103,7 @@ export const tableRelationships: TableRelationships = { }, { table: 'datasets', - foreignKeys: 'dataID', + foreignKeys: 'datasetID', auth: { depth: 1, required: true }, }, { table: 'methodSets', foreignKeys: 'mSRID' }, @@ -105,7 +111,7 @@ export const tableRelationships: TableRelationships = { { table: 'polygons', foreignKeys: 'polygonID' }, { table: 'measureSets', foreignKeys: 'measSetRepID' }, { - table: 'partLUs', + table: 'parts', properties: [ { property: 'purpose', foreignKeys: ['partID', 'purposeID'] }, { property: 'spec', foreignKeys: ['partID', 'specID'] }, @@ -118,6 +124,15 @@ export const tableRelationships: TableRelationships = { ], }, ], + qualityReports: [ + { + table: 'measures', + foreignKeys: 'measureRepID', + auth: { depth: 1, required: true }, + }, + { table: 'samples', foreignKeys: 'sampleID' }, + // { table: 'contacts', foreignKeys: 'contactID' }, + ], measureSets: [ { table: 'methodSets', foreignKeys: 'mSRID' }, { @@ -128,8 +143,8 @@ export const tableRelationships: TableRelationships = { ], sites: [ { table: 'sites', foreignKeys: ['siteID', 'parSiteID'] }, - { table: 'polygons', foreignKeys: 'polygonID' }, - { table: 'datasets', foreignKeys: 'dataID' }, + // { table: 'polygons', foreignKeys: 'polygonID' }, + // { table: 'datasets', foreignKeys: 'datasetID' }, { table: 'measures', foreignKeys: 'siteID' }, { table: 'samples', @@ -156,13 +171,13 @@ export const tableRelationships: TableRelationships = { }, { table: 'samples', - foreignKeys: 'dataID', + foreignKeys: 'datasetID', auth: { depth: 2, required: true }, }, - { table: 'measures', foreignKeys: 'dataID' }, - { table: 'polygons', foreignKeys: 'dataID' }, - { table: 'instruments', foreignKeys: 'dataID' }, - { table: 'sites', foreignKeys: 'dataID' }, + { table: 'measures', foreignKeys: 'datasetID' }, + { table: 'polygons', foreignKeys: 'datasetID' }, + { table: 'instruments', foreignKeys: 'datasetID' }, + { table: 'sites', foreignKeys: 'datasetID' }, ], polygons: [ { table: 'measures', foreignKeys: 'polygonID' }, @@ -173,7 +188,7 @@ export const tableRelationships: TableRelationships = { }, ], instruments: [ - { table: 'datasets', foreignKeys: 'dataID', auth: { depth: 3 } }, + { table: 'datasets', foreignKeys: 'datasetID', auth: { depth: 3 } }, { table: 'methodSteps', foreignKeys: 'instID' }, ], @@ -184,7 +199,7 @@ export const tableRelationships: TableRelationships = { ], methodSteps: [ { - table: 'partLUs', + table: 'parts', properties: [ { property: 'meth', foreignKeys: ['partID', 'methID'] }, { property: 'meas', foreignKeys: ['partID', 'measID'] }, @@ -207,15 +222,15 @@ export const tableRelationships: TableRelationships = { { table: 'measures', foreignKeys: 'mSRID' }, { table: 'measureSets', foreignKeys: 'mSRID' }, ], - languageLUs: [{ table: 'translationLUs', foreignKeys: 'langID' }], - translationLUs: [ - { table: 'languageLUs', foreignKeys: 'langID' }, - { table: 'partLUs', foreignKeys: 'partID' }, + languages: [{ table: 'translations', foreignKeys: 'langID' }], + translations: [ + { table: 'languages', foreignKeys: 'langID' }, + { table: 'parts', foreignKeys: 'partID' }, ], allSites: [ { table: 'datasets', - foreignKeys: 'dataID', + foreignKeys: 'datasetID', auth: { depth: 1, required: true }, }, { @@ -225,7 +240,7 @@ export const tableRelationships: TableRelationships = { }, { table: 'samples', foreignKeys: ['sampID', 'sampleID'] }, { - table: 'partLUs', + table: 'parts', properties: [ { property: 'fraction', foreignKeys: ['partID', 'fractionID'] }, { property: 'meas', foreignKeys: ['partID', 'measID'] }, @@ -235,7 +250,7 @@ export const tableRelationships: TableRelationships = { allSitesAdj: [ { table: 'datasets', - foreignKeys: 'dataID', + foreignKeys: 'datasetID', auth: { depth: 1, required: true }, }, { @@ -245,7 +260,7 @@ export const tableRelationships: TableRelationships = { }, { table: 'samples', foreignKeys: ['sampID', 'sampleID'] }, { - table: 'partLUs', + table: 'parts', properties: [ { property: 'fraction', foreignKeys: ['partID', 'fractionID'] }, { property: 'meas', foreignKeys: ['partID', 'measID'] }, @@ -254,7 +269,7 @@ export const tableRelationships: TableRelationships = { ], Infobase: [ { - table: 'partLUs', + table: 'parts', properties: [ { property: 'fraction', foreignKeys: ['partID', 'fractionid'] }, { property: 'meas', foreignKeys: ['partID', 'measureid'] }, @@ -263,7 +278,7 @@ export const tableRelationships: TableRelationships = { ], InfobaseTrend: [ { - table: 'partLUs', + table: 'parts', properties: [ { property: 'fraction', foreignKeys: ['partID', 'fractionid'] }, { property: 'meas', foreignKeys: ['partID', 'measureid'] }, diff --git a/graphql/auth.ts b/graphql/auth.ts index 6166922..8f3517d 100644 --- a/graphql/auth.ts +++ b/graphql/auth.ts @@ -19,7 +19,7 @@ export const groups: { readonly [authGroup: string]: AuthFilters } = { where: ['healthReg', 'Vancouver'], }, datasets: { - whereIn: ['dataID', ['BCCDC', 'NML-WWPCR']], + whereIn: ['datasetID', ['BCCDC', 'NML-WWPCR']], }, }, hnj: { @@ -27,7 +27,7 @@ export const groups: { readonly [authGroup: string]: AuthFilters } = { whereIn: ['healthReg', ['Whitehorse', 'Haines Junction']], }, datasets: { - whereIn: ['dataID', ['NML-WWPCR', 'NML-GXWW', 'onsite-GXWW']], + whereIn: ['datasetID', ['NML-WWPCR', 'NML-GXWW', 'onsite-GXWW']], }, }, open: { diff --git a/graphql/resolvers.ts b/graphql/resolvers.ts index 9a692c9..678ac78 100644 --- a/graphql/resolvers.ts +++ b/graphql/resolvers.ts @@ -8,139 +8,144 @@ import { Resolvers } from './types'; */ const resolvers: Resolvers = { Samples: withParentResolver('samples')(({ single, list }) => ({ - parentSample: single('methodSets'), - site: single('sites'), - methodSet: single('methodSets'), - contact: single('contacts'), - purpose: single('partLUs'), - dataset: single('datasets'), - measures: list('measures'), + // parentSample: single('methodSets'), + // site: single('sites'), + // methodSet: single('methodSets'), + // contact: single('contacts'), + // purpose: single('parts'), + // dataset: single('datasets'), + // measures: list('measures'), })), Measures: withParentResolver('measures')(({ single }) => ({ - methodSet: single('methodSets'), - sample: single('samples'), - purpose: single('partLUs', 'purpose'), - polygon: single('polygons'), - site: single('sites'), - dataset: single('datasets'), - measureSet: single('measureSets'), - spec: single('partLUs', 'spec'), - fraction: single('partLUs', 'fraction'), - meas: single('partLUs', 'meas'), - group: single('partLUs', 'group'), - class: single('partLUs', 'class'), - unit: single('partLUs', 'unit'), - agg: single('partLUs', 'agg'), - })), - Addresses: withParentResolver('addresses')(({ list }) => ({ - organizations: list('organizations'), - sites: list('sites'), - })), - Organizations: withParentResolver('organizations')(({ single, list }) => ({ - address: single('addresses'), - contacts: list('contacts'), - methodSteps: list('methodSteps'), - })), + // methodSet: single('methodSets'), + // sample: single('samples'), + // purpose: single('parts', 'purpose'), + // polygon: single('polygons'), + // site: single('sites'), + // dataset: single('datasets'), + // measureSet: single('measureSets'), + // spec: single('parts', 'spec'), + // fraction: single('parts', 'fraction'), + // meas: single('parts', 'meas'), + // group: single('parts', 'group'), + // class: single('parts', 'class'), + // unit: single('parts', 'unit'), + // agg: single('parts', 'agg'), + })), + // Addresses: withParentResolver('addresses')(({ list }) => ({ + // organizations: list('organizations'), + // sites: list('sites'), + // })), + // Organizations: withParentResolver('organizations')(({ single, list }) => ({ + // address: single('addresses'), + // contacts: list('contacts'), + // methodSteps: list('methodSteps'), + // })), Datasets: withParentResolver('datasets')(({ single, list }) => ({ - funder: single('organizations', 'funder'), - custody: single('organizations', 'custody'), - samples: list('samples'), - measures: list('measures'), - polygons: list('polygons'), - instruments: list('instruments'), - sites: list('sites'), - })), - Polygons: withParentResolver('polygons')(({ list }) => ({ - measures: list('measures'), - sites: list('sites'), - })), - Instruments: withParentResolver('instruments')(({ single, list }) => ({ - dataset: single('datasets'), - methodSteps: list('methodSteps'), - })), - Contacts: withParentResolver('contacts')(({ single, list }) => ({ - organization: single('contacts'), - samples: list('samples'), - methodSteps: list('methodSteps'), - })), - MethodSteps: withParentResolver('methodSteps')(({ single, list }) => ({ - meth: single('partLUs', 'meth'), - meas: single('partLUs', 'meas'), - organization: single('organizations'), - contact: single('contacts'), - instrument: single('instruments'), - unit: single('partLUs', 'unit'), - agg: single('partLUs', 'agg'), - methodSets: list('methodSets'), - })), - MethodSets: withParentResolver('methodSets')(({ single, list }) => ({ - methodStep: single('methodSteps'), - samples: list('samples'), - measures: list('measures'), - measureSets: list('measureSets'), - })), - MeasureSets: withParentResolver('measureSets')(({ single, list }) => ({ - methodSet: single('methodSets'), - measures: list('measures'), - })), - LanguageLUs: withParentResolver('languageLUs')(({ list }) => ({ - translationLUs: list('translationLUs'), - })), - TranslationLUs: withParentResolver('translationLUs')(({ single }) => ({ - languageLU: single('languageLUs'), - partLU: single('partLUs'), - })), + // funder: single('organizations', 'funder'), + // custody: single('organizations', 'custody'), + // samples: list('samples'), + // measures: list('measures'), + // polygons: list('polygons'), + // instruments: list('instruments'), + // sites: list('sites'), + })), + // Polygons: withParentResolver('polygons')(({ list }) => ({ + // measures: list('measures'), + // sites: list('sites'), + // })), + // Instruments: withParentResolver('instruments')(({ single, list }) => ({ + // dataset: single('datasets'), + // methodSteps: list('methodSteps'), + // })), + // Contacts: withParentResolver('contacts')(({ single, list }) => ({ + // organization: single('contacts'), + // samples: list('samples'), + // methodSteps: list('methodSteps'), + // })), + // MethodSteps: withParentResolver('methodSteps')(({ single, list }) => ({ + // meth: single('parts', 'meth'), + // meas: single('parts', 'meas'), + // organization: single('organizations'), + // contact: single('contacts'), + // instrument: single('instruments'), + // unit: single('parts', 'unit'), + // agg: single('parts', 'agg'), + // methodSets: list('methodSets'), + // })), + // MethodSets: withParentResolver('methodSets')(({ single, list }) => ({ + // methodStep: single('methodSteps'), + // samples: list('samples'), + // measures: list('measures'), + // measureSets: list('measureSets'), + // })), + // MeasureSets: withParentResolver('measureSets')(({ single, list }) => ({ + // methodSet: single('methodSets'), + // measures: list('measures'), + // })), + // LanguageLUs: withParentResolver('languageLUs')(({ list }) => ({ + // translationLUs: list('translationLUs'), + // })), + // TranslationLUs: withParentResolver('translationLUs')(({ single }) => ({ + // languageLU: single('languageLUs'), + // partLU: single('parts'), + // })), Sites: withParentResolver('sites')(({ single, list }) => ({ - parentSite: single('sites'), - polygon: single('polygons'), - dataset: single('datasets'), - measures: list('measures'), - samples: list('samples'), + // parentSite: single('sites'), + // polygon: single('polygons'), + // dataset: single('datasets'), + // measures: list('measures'), + // samples: list('samples'), })), allSites: withParentResolver('allSites')(({ single }) => ({ - dataset: single('datasets'), - sample: single('samples', 'sampID'), - fraction: single('partLUs', 'fraction'), - meas: single('partLUs', 'meas'), + // dataset: single('datasets'), + // sample: single('samples', 'sampID'), + // fraction: single('parts', 'fraction'), + // meas: single('parts', 'meas'), })), allSitesAdj: withParentResolver('allSitesAdj')(({ single }) => ({ - dataset: single('datasets'), - sample: single('samples'), - fraction: single('partLUs', 'fraction'), - meas: single('partLUs', 'meas'), + // dataset: single('datasets'), + // sample: single('samples'), + // fraction: single('parts', 'fraction'), + // meas: single('parts', 'meas'), })), Infobase: withParentResolver('Infobase')(({ single }) => ({ - fraction: single('partLUs', 'fraction'), - meas: single('partLUs', 'meas'), + // fraction: single('parts', 'fraction'), + // meas: single('parts', 'meas'), })), InfobaseTrend: withParentResolver('InfobaseTrend')(({ single }) => ({ - fraction: single('partLUs', 'fraction'), - meas: single('partLUs', 'meas'), + // fraction: single('parts', 'fraction'), + // meas: single('parts', 'meas'), })), StandardCurve: withParentResolver('StandardCurve')(({ single }) => ({})), + Countries: withParentResolver('countries')(({ single }) => ({})), + Zones: withParentResolver('zones')(({ single }) => ({})), Query: { - addresses: apiResolver('addresses'), - organizations: apiResolver('organizations'), + // addresses: apiResolver('addresses'), + // organizations: apiResolver('organizations'), datasets: apiResolver('datasets'), - polygons: apiResolver('polygons'), - instruments: apiResolver('instruments'), - setLUs: apiResolver('setLUs'), - partLUs: apiResolver('partLUs'), - contacts: apiResolver('contacts'), - methodSteps: apiResolver('methodSteps'), - methodSets: apiResolver('methodSets'), - measureSets: apiResolver('measureSets'), - languageLUs: apiResolver('languageLUs'), - translationLUs: apiResolver('translationLUs'), + // polygons: apiResolver('polygons'), + // instruments: apiResolver('instruments'), + sets: apiResolver('sets'), + parts: apiResolver('parts'), + // contacts: apiResolver('contacts'), + // methodSteps: apiResolver('methodSteps'), + // methodSets: apiResolver('methodSets'), + // measureSets: apiResolver('measureSets'), + languages: apiResolver('languages'), + translations: apiResolver('translations'), samples: apiResolver('samples'), sites: apiResolver('sites'), measures: apiResolver('measures'), + qualityReports: apiResolver('qualityReports'), allSites: apiResolver('allSites'), allSitesAdj: apiResolver('allSitesAdj'), Infobase: apiResolver('Infobase'), InfobaseTrend: apiResolver('InfobaseTrend'), StandardCurve: apiResolver('StandardCurve'), + countries: apiResolver('countries'), + zones: apiResolver('zones'), }, }; diff --git a/graphql/schema/Infobase.graphql b/graphql/schema/Infobase.graphql index 7268151..8162552 100644 --- a/graphql/schema/Infobase.graphql +++ b/graphql/schema/Infobase.graphql @@ -18,8 +18,8 @@ type Infobase { viral_load: Float seven_day_rolling_avg: Float pruid: Int - fraction: PartLUs - meas: PartLUs + # fraction: PartLUs + # meas: PartLUs } extend type Query { diff --git a/graphql/schema/InfobaseTrend.graphql b/graphql/schema/InfobaseTrend.graphql index be519e5..272ae0f 100644 --- a/graphql/schema/InfobaseTrend.graphql +++ b/graphql/schema/InfobaseTrend.graphql @@ -14,8 +14,8 @@ type InfobaseTrend { measureid: String LatestTrend: String pruid: Int - fraction: PartLUs - meas: PartLUs + # fraction: PartLUs + # meas: PartLUs } extend type Query { diff --git a/graphql/schema/StandardCurve.graphql b/graphql/schema/StandardCurve.graphql index 943e293..83a7a41 100644 --- a/graphql/schema/StandardCurve.graphql +++ b/graphql/schema/StandardCurve.graphql @@ -16,7 +16,7 @@ type StandardCurve { CDCB_Curve_ID: String RSVA_Curve_ID: String RSVB_Curve_ID: String - sample: Samples + # sample: Samples } extend type Query { diff --git a/graphql/schema/addresses.graphql b/graphql/schema/addresses.graphql deleted file mode 100644 index 748c38c..0000000 --- a/graphql/schema/addresses.graphql +++ /dev/null @@ -1,27 +0,0 @@ -type Addresses { - addID: String - dataID: String - addL1: String - addL2: String - city: String - stateProvReg: String - pCode: String - country: String - organizations(filter: OrganizationsFilter): [Organizations]! - sites(filter: SitesFilter): [Sites]! -} - -input AddressesFilter { - addID: StringFilter - dataID: StringFilter - addL1: StringFilter - addL2: StringFilter - city: StringFilter - stateProvReg: StringFilter - pCode: StringFilter - country: StringFilter -} - -extend type Query { - addresses(filter: AddressesFilter): [Addresses]! -} diff --git a/graphql/schema/allSites.graphql b/graphql/schema/allSites.graphql index 5a863d1..d9cf64d 100644 --- a/graphql/schema/allSites.graphql +++ b/graphql/schema/allSites.graphql @@ -23,11 +23,11 @@ type allSites { MA7: Float confidence: Int siteID: String - dataset: Datasets - sample: Samples - fraction: PartLUs - meas: PartLUs - site: Sites + # dataset: Datasets + # sample: Samples + # fraction: PartLUs + # meas: PartLUs + # site: Sites } extend type Query { diff --git a/graphql/schema/allSitesAdj.graphql b/graphql/schema/allSitesAdj.graphql index 0901191..0b1f3e0 100644 --- a/graphql/schema/allSitesAdj.graphql +++ b/graphql/schema/allSitesAdj.graphql @@ -23,11 +23,11 @@ type allSitesAdj { MA7: Float confidence: Int siteID: String - dataset: Datasets - sample: Samples - fraction: PartLUs - meas: PartLUs - site: Sites + # dataset: Datasets + # sample: Samples + # fraction: PartLUs + # meas: PartLUs + # site: Sites } extend type Query { diff --git a/graphql/schema/contacts.graphql b/graphql/schema/contacts.graphql deleted file mode 100644 index 564ab3c..0000000 --- a/graphql/schema/contacts.graphql +++ /dev/null @@ -1,28 +0,0 @@ -type Contacts { - contID: String - orgID: String - firstName: String - lastName: String - email: String - phone: String - role: String - notes: String - organization: Organizations - samples(filter: SamplesFilter): [Samples]! - methodSteps(filter: MethodStepsFilter): [MethodSteps]! -} - -input ContactsFilter { - contID: StringFilter - orgID: StringFilter - firstName: StringFilter - lastName: StringFilter - email: StringFilter - phone: StringFilter - role: StringFilter - notes: StringFilter -} - -extend type Query { - contacts(filter: ContactsFilter): [Contacts]! -} diff --git a/graphql/schema/countries.graphql b/graphql/schema/countries.graphql new file mode 100644 index 0000000..1f4d565 --- /dev/null +++ b/graphql/schema/countries.graphql @@ -0,0 +1,41 @@ +type Countries { + isoCode: String + isoCodeX: String + numCode: String + tld: String + nameEngl: String + nameOffical: String + sovereignity: String + countryExonym: String + capitalExonym: String + countryEndonym: String + capitalEndonym: String + langScript: String + phone: String + utc: String + utcDST: String +# zones(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageZones +# addresses(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageAddresses +} + +input CountriesFilter { + isoCode: StringFilter + isoCodeX: StringFilter + numCode: StringFilter + tld: StringFilter + nameEngl: StringFilter + nameOffical: StringFilter + sovereignity: StringFilter + countryExonym: StringFilter + capitalExonym: StringFilter + countryEndonym: StringFilter + capitalEndonym: StringFilter + langScript: StringFilter + phone: StringFilter + utc: StringFilter + utcDST: StringFilter +} + +extend type Query { + countries(filter: CountriesFilter): [Countries]! +} diff --git a/graphql/schema/datasets.graphql b/graphql/schema/datasets.graphql index ff53e25..9ee792f 100644 --- a/graphql/schema/datasets.graphql +++ b/graphql/schema/datasets.graphql @@ -1,27 +1,33 @@ type Datasets { - dataID: String + parDatasetID: String + datasetID: String name: String license: String descr: String refLink: String + langID: Int + funderCont: String + custodyCont: String funderID: String custodyID: String notes: String - funder: Organizations - custody: Organizations - samples(filter: SamplesFilter): [Samples]! - measures(filter: MeasuresFilter): [Measures]! - polygons(filter: PolygonsFilter): [Polygons]! - instruments(filter: InstrumentsFilter): [Instruments]! - sites(filter: SitesFilter): [Sites]! + # samples(filter: SamplesFilter): [Samples]! + # measures(filter: MeasuresFilter): [Measures]! + # polygons(filter: PolygonsFilter): [Polygons]! + # instruments(filter: InstrumentsFilter): [Instruments]! + # sites(filter: SitesFilter): [Sites]! } input DatasetsFilter { - dataID: StringFilter + parDatasetID: StringFilter + datasetID: StringFilter name: StringFilter license: StringFilter descr: StringFilter refLink: StringFilter + langID: IntFilter + funderCont: StringFilter + custodyCont: StringFilter funderID: StringFilter custodyID: StringFilter notes: StringFilter diff --git a/graphql/schema/instruments.graphql b/graphql/schema/instruments.graphql deleted file mode 100644 index 9768f59..0000000 --- a/graphql/schema/instruments.graphql +++ /dev/null @@ -1,31 +0,0 @@ -type Instruments { - instID: String - dataID: String - name: String - model: String - descr: String - refLink: String - instType: String - insTypeOth: String - lastEdit: DateTime - notes: String - dataset: Datasets - methodSteps(filter: MethodStepsFilter): [MethodSteps]! -} - -input InstrumentsFilter { - instID: StringFilter - dataID: StringFilter - name: StringFilter - model: StringFilter - descr: StringFilter - refLink: StringFilter - instType: StringFilter - insTypeOth: StringFilter - lastEdit: DateTimeFilter - notes: StringFilter -} - -extend type Query { - instruments(filter: InstrumentsFilter): [Instruments]! -} diff --git a/graphql/schema/languageLUs.graphql b/graphql/schema/languages.graphql similarity index 66% rename from graphql/schema/languageLUs.graphql rename to graphql/schema/languages.graphql index f5672cc..1cb20fc 100644 --- a/graphql/schema/languageLUs.graphql +++ b/graphql/schema/languages.graphql @@ -1,30 +1,31 @@ -type LanguageLUs { - langID: String +type Languages { + lang: String langFam: String langName: String natName: String ISO6391: String - ISO6392T: String ISO6392B: String + ISO6392T: String ISO6393: String ISO6396: String + changes: String notes: String - translationLUs(filter: TranslationLUsFilter): [TranslationLUs]! } -input LanguageLUsFilter { - langID: StringFilter +input LanguagesFilter { + lang: StringFilter langFam: StringFilter langName: StringFilter natName: StringFilter ISO6391: StringFilter - ISO6392T: StringFilter ISO6392B: StringFilter + ISO6392T: StringFilter ISO6393: StringFilter ISO6396: StringFilter + changes: StringFilter notes: StringFilter } extend type Query { - languageLUs(filter: LanguageLUsFilter): [LanguageLUs]! + languages(filter: LanguagesFilter): [Languages]! } diff --git a/graphql/schema/measureSets.graphql b/graphql/schema/measureSets.graphql deleted file mode 100644 index 5c23c53..0000000 --- a/graphql/schema/measureSets.graphql +++ /dev/null @@ -1,15 +0,0 @@ -type MeasureSets { - MeasSetRepID: String - mSRID: String - methodSet: MethodSets - measures(filter: MeasuresFilter): [Measures]! -} - -input MeasureSetsFilter { - MeasSetRepID: StringFilter - mSRID: StringFilter -} - -extend type Query { - measureSets(filter: MeasureSetsFilter): [MeasureSets]! -} diff --git a/graphql/schema/measures.graphql b/graphql/schema/measures.graphql index b3d2b5e..39b4376 100644 --- a/graphql/schema/measures.graphql +++ b/graphql/schema/measures.graphql @@ -1,69 +1,74 @@ input MeasuresFilter { - measRepID: StringFilter - mSRID: StringFilter + measureRepID: StringFilter + protocolID: StringFilter sampleID: StringFilter purposeID: StringFilter polygonID: StringFilter siteID: StringFilter - dataID: StringFilter - measSetRepID: StringFilter - aDateStart: DateTimeFilter - aDateEnd: DateTimeFilter - repDate: DateTimeFilter - specID: StringFilter - fractionID: StringFilter - measID: StringFilter - groupID: StringFilter - classID: StringFilter + datasetID: StringFilter + measureSetRepID: StringFilter + compartment: StringFilter + specimenID: StringFilter + fraction: StringFilter + group: StringFilter + class: StringFilter + measure: StringFilter value: StringFilter - unitID: StringFilter - aggID: StringFilter + unit: StringFilter + aggregation: StringFilter + nomenclature: StringFilter index: IntFilter - qualityFlag: StringFilter - reportable: Boolean - lastEdited: DateTimeFilter - notes: StringFilter + measureLic: StringFilter + reportable: IntFilter + organizationID: StringFilter + contactID: StringFilter + refLink: StringFilter } type Measures { - measRepID: String - mSRID: String + measureRepID: String + protocolID: String sampleID: String purposeID: String polygonID: String siteID: String - dataID: String - measSetRepID: String - aDateStart: DateTime - aDateEnd: DateTime - repDate: DateTime - specID: String - fractionID: String - measID: String - groupID: String - classID: String + datasetID: String + measureSetRepID: String + compartment: String + specimenID: String + fraction: String + group: String + class: String + measure: String value: String - unitID: String - aggID: String + unit: String + aggregation: String + nomenclature: String index: Int - qualityFlag: String - reportable: Boolean - lastEdited: DateTime - notes: String - methodSet: MethodSets - sample: Samples - purpose: PartLUs - polygon: Polygons - site: Sites - dataset: Datasets - measureSet: MeasureSets - spec: PartLUs - fraction: PartLUs - meas: PartLUs - group: PartLUs - class: PartLUs - unit: PartLUs - agg: PartLUs + measureLic: String + reportable: Int + organizationID: String + contactID: String + refLink: String + # protocolID_protocols: Protocols + # sampleID_samples: Samples + # purposeID_parts: Parts + # polygonID_polygons: Polygons + # siteID_sites: Sites + # datasetID_datasets: Datasets + # measureSetRepID_measureSets: MeasureSets + # specimenID_parts: Parts + # fraction_parts: Parts + # group_parts: Parts + # class_parts: Parts + # measure_parts: Parts + # unit_parts: Parts + # aggregation_parts: Parts + # nomenclature_parts: Parts + # measureLic_parts: Parts + # organizationID_organizations: Organizations + # contactID_contacts: Contacts + # qualityReports(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageQualityReports } extend type Query { diff --git a/graphql/schema/methodSets.graphql b/graphql/schema/methodSets.graphql deleted file mode 100644 index 7c63e61..0000000 --- a/graphql/schema/methodSets.graphql +++ /dev/null @@ -1,25 +0,0 @@ -type MethodSets { - mSRID: String - methSetID_CK: String - StepID: String - stepIndexID_CK: Int - setVers: String - notes: String - methodStep: MethodSets - samples(filter: SamplesFilter): [Samples]! - measures(filter: MeasuresFilter): [Measures]! - measureSets(filter: MeasureSetsFilter): [MeasureSets]! -} - -input MethodSetsFilter { - mSRID: String - methSetID_CK: String - StepID: String - stepIndexID_CK: Int - setVers: String - notes: String -} - -extend type Query { - methodSets(filter: MethodSetsFilter): [MethodSets]! -} diff --git a/graphql/schema/methodSteps.graphql b/graphql/schema/methodSteps.graphql deleted file mode 100644 index 0684b22..0000000 --- a/graphql/schema/methodSteps.graphql +++ /dev/null @@ -1,47 +0,0 @@ -type MethodSteps { - stepID: String - methID: String - measID: String - name: String - summ: String - stepVer: String - refLink: String - orgID: String - contID: String - instID: String - value: String - unitID: String - aggID: String - lastEdit: DateTime - notes: String - meth: PartLUs - meas: PartLUs - organization: Organizations - contact: Contacts - instrument: Instruments - unit: PartLUs - agg: PartLUs - methodSets(filter: MethodSetsFilter): [MethodSets]! -} - -input MethodStepsFilter { - stepID: StringFilter - methID: StringFilter - measID: StringFilter - name: StringFilter - summ: StringFilter - stepVer: StringFilter - refLink: StringFilter - orgID: StringFilter - contID: StringFilter - instID: StringFilter - value: StringFilter - unitID: StringFilter - aggID: StringFilter - lastEdit: DateTimeFilter - notes: StringFilter -} - -extend type Query { - methodSteps(filter: MethodStepsFilter): [MethodSteps]! -} diff --git a/graphql/schema/organizations.graphql b/graphql/schema/organizations.graphql deleted file mode 100644 index ecdc6fd..0000000 --- a/graphql/schema/organizations.graphql +++ /dev/null @@ -1,22 +0,0 @@ -type Organizations { - orgID: String - addID: String - orgTypeID: String - name: String - descr: String - address: Addresses - contacts(filter: ContactsFilter): [Contacts]! - methodSteps(filter: MethodStepsFilter): [MethodSteps]! -} - -input OrganizationsFilter { - orgID: StringFilter - addID: StringFilter - orgTypeID: StringFilter - name: StringFilter - descr: StringFilter -} - -extend type Query { - organizations(filter: OrganizationsFilter): [Organizations]! -} diff --git a/graphql/schema/partLUs.graphql b/graphql/schema/partLUs.graphql deleted file mode 100644 index 6347666..0000000 --- a/graphql/schema/partLUs.graphql +++ /dev/null @@ -1,145 +0,0 @@ -type PartLUs { - partID: String - partType: String - partLabel: String - partDesc: String - partInstr: String - domainID: String - specSet: String - compSet: String - groupID: String - classID: String - nomenclatureID: String - ontologyRef: String - latExp: String - catSetID: String - unitSetID: String - aggScaleID: String - aggSetID: String - qualitySetID: String - status: String - firstRel: String - lastUp: String - changes: String - methodSteps: String - methodStepsRequired: String - methodStepsOrder: Int - methodSets: String - methodSetsRequired: String - methodSetsOrder: String - measures: String - measuresRequired: String - measuresOrder: String - measureSets: String - measureSetsRequired: String - measureSetsOrder: String - datasets: String - datasetsRequired: String - datasetsOrder: String - sites: String - sitesRequired: String - sitesOrder: String - samples: String - samplesRequired: String - samplesOrder: String - addresses: String - addressesRequired: String - addressesOrder: String - contacts: String - contactsRequired: String - contactsOrder: String - organizations: String - orgganizationsRequired: String - organizationsOrder: String - instruments: String - instrumentsRequired: String - instrumentsOrder: String - polygons: String - polygonsRequired: String - polygonsOrder: String - languageLUs: String - translationLUs: String - partLUs: String - setLUs: String - refLink: String - dataType: String - minValue: String - maxValue: String - minLength: Int - maxLength: Int -} - -input PartLUsFilter { - partID: StringFilter - partType: StringFilter - partLabel: StringFilter - partDesc: StringFilter - partInstr: StringFilter - domainID: StringFilter - specSet: StringFilter - compSet: StringFilter - groupID: StringFilter - classID: StringFilter - nomenclatureID: StringFilter - ontologyRef: StringFilter - latExp: StringFilter - catSetID: StringFilter - unitSetID: StringFilter - aggScaleID: StringFilter - aggSetID: StringFilter - qualitySetID: StringFilter - status: StringFilter - firstRel: StringFilter - lastUp: StringFilter - changes: StringFilter - methodSteps: StringFilter - methodStepsRequired: StringFilter - methodStepsOrder: IntFilter - methodSets: StringFilter - methodSetsRequired: StringFilter - methodSetsOrder: StringFilter - measures: StringFilter - measuresRequired: StringFilter - measuresOrder: StringFilter - measureSets: StringFilter - measureSetsRequired: StringFilter - measureSetsOrder: StringFilter - datasets: StringFilter - datasetsRequired: StringFilter - datasetsOrder: StringFilter - sites: StringFilter - sitesRequired: StringFilter - sitesOrder: StringFilter - samples: StringFilter - samplesRequired: StringFilter - samplesOrder: StringFilter - addresses: StringFilter - addressesRequired: StringFilter - addressesOrder: StringFilter - contacts: StringFilter - contactsRequired: StringFilter - contactsOrder: StringFilter - organizations: StringFilter - orgganizationsRequired: StringFilter - organizationsOrder: StringFilter - instruments: StringFilter - instrumentsRequired: StringFilter - instrumentsOrder: StringFilter - polygons: StringFilter - polygonsRequired: StringFilter - polygonsOrder: StringFilter - languageLUs: StringFilter - translationLUs: StringFilter - partLUs: StringFilter - setLUs: StringFilter - refLink: StringFilter - dataType: StringFilter - minValue: StringFilter - maxValue: StringFilter - minLength: IntFilter - maxLength: IntFilter -} - -extend type Query { - partLUs(filter: PartLUsFilter): [PartLUs]! -} diff --git a/graphql/schema/parts.graphql b/graphql/schema/parts.graphql new file mode 100644 index 0000000..8e0ba3e --- /dev/null +++ b/graphql/schema/parts.graphql @@ -0,0 +1,205 @@ +type Parts { + partID: String + partLabel: String + partType: String + shortName: String + partDesc: String + partInstr: String + domain: String + specimenSet: String + compartmentSet: String + group: String + class: String + nomenclature: String + ontologyRef: String + latExp: String + mmaSet: String + unitSet: String + aggreationScale: String + aggregationSet: String + qualitySet: String + missingnessSet: String + status: String + changes: String + # protocolSteps(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageProtocolSteps + protocolSteps: String + protocolStepsRequired: String + protocolStepsOrder: Int + protocolRelationships: String + protocolRelationshipsRequired: String + protocolRelationshipsOrder: Int + # measures(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageMeasures + measures: String + measuresRequired: String + measuresOrder: Int + measureSets: String + measureSetsRequired: String + measureSetsOrder: Int + datasets: String + datasetsRequired: String + datasetsOrder: Int + # sites(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageSites + sites: String + sitesRequired: String + sitesOrder: Int + # samples(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageSamples + samples: String + samplesRequired: String + samplesOrder: Int + addresses: String + addressesRequired: String + addressesOrder: Int + contacts: String + contactsRequired: String + contactsOrder: Int + organizations: String + organizationsRequired: String + organizationsOrder: Int + # instruments(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageInstruments + instruments: String + instrumentsRequired: String + instrumentsOrder: Int + polygons: String + polygonsRequired: String + polygonsOrder: Int + languages: String + languagesRequired: String + languagesOrder: Int + # translations(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageTranslations + translations: String + translationsRequired: String + translationsOrder: Int + parts: String + partsRequired: String + partsOrder: Int + sets: String + setsRquired: String + setsOrder: Int + qualityReports: String + qualityReportsRequired: String + qualityReportsOrder: Int + # sampleRelationships(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageSampleRelationships + sampleRelationships: String + sampleRelationshipsRequired: String + sampleRelationshipsOrder: Int + protocols: String + protocolsRequired: String + protocolsOrder: Int + countries: String + countriesRequired: String + countriesOrder: Int + zones: String + zonesRequired: String + zonesOrder: Int + refLink: String + dataType: String + minValue: String # contains string 'seeUnitVal' + maxValue: String # contains string 'seeUnitVal' + minLength: Int + maxLength: Int + # specimenSet_sets: Sets + # compartmentSet_sets: Sets + # unitSet_sets: Sets + # aggregationSet_sets: Sets + # qualitySet_sets: Sets + # missingnessSet_sets: Sets + # wideNames(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageWideNames +} + +input PartsFilter { + partID: StringFilter + partLabel: StringFilter + partType: StringFilter + shortName: StringFilter + partDesc: StringFilter + partInstr: StringFilter + domain: StringFilter + specimenSet: StringFilter + compartmentSet: StringFilter + group: StringFilter + class: StringFilter + nomenclature: StringFilter + ontologyRef: StringFilter + latExp: StringFilter + mmaSet: StringFilter + unitSet: StringFilter + aggreationScale: StringFilter + aggregationSet: StringFilter + qualitySet: StringFilter + missingnessSet: StringFilter + status: StringFilter + changes: StringFilter + protocolSteps: StringFilter + protocolStepsRequired: StringFilter + protocolStepsOrder: IntFilter + protocolRelationships: StringFilter + protocolRelationshipsRequired: StringFilter + protocolRelationshipsOrder: IntFilter + measures: StringFilter + measuresRequired: StringFilter + measuresOrder: IntFilter + measureSets: StringFilter + measureSetsRequired: StringFilter + measureSetsOrder: IntFilter + datasets: StringFilter + datasetsRequired: StringFilter + datasetsOrder: IntFilter + sites: StringFilter + sitesRequired: StringFilter + sitesOrder: IntFilter + samples: StringFilter + samplesRequired: StringFilter + samplesOrder: IntFilter + addresses: StringFilter + addressesRequired: StringFilter + addressesOrder: IntFilter + contacts: StringFilter + contactsRequired: StringFilter + contactsOrder: IntFilter + organizations: StringFilter + organizationsRequired: StringFilter + organizationsOrder: IntFilter + instruments: StringFilter + instrumentsRequired: StringFilter + instrumentsOrder: IntFilter + polygons: StringFilter + polygonsRequired: StringFilter + polygonsOrder: IntFilter + languages: StringFilter + languagesRequired: StringFilter + languagesOrder: IntFilter + translations: StringFilter + translationsRequired: StringFilter + translationsOrder: IntFilter + parts: StringFilter + partsRequired: StringFilter + partsOrder: IntFilter + sets: StringFilter + setsRquired: StringFilter + setsOrder: IntFilter + qualityReports: StringFilter + qualityReportsRequired: StringFilter + qualityReportsOrder: IntFilter + sampleRelationships: StringFilter + sampleRelationshipsRequired: StringFilter + sampleRelationshipsOrder: IntFilter + protocols: StringFilter + protocolsRequired: StringFilter + protocolsOrder: IntFilter + countries: StringFilter + countriesRequired: StringFilter + countriesOrder: IntFilter + zones: StringFilter + zonesRequired: StringFilter + zonesOrder: IntFilter + refLink: StringFilter + dataType: StringFilter + minValue: StringFilter + maxValue: StringFilter + minLength: IntFilter + maxLength: IntFilter +} + +extend type Query { + parts(filter: PartsFilter): [Parts]! +} diff --git a/graphql/schema/polygons.graphql b/graphql/schema/polygons.graphql deleted file mode 100644 index 1555ef7..0000000 --- a/graphql/schema/polygons.graphql +++ /dev/null @@ -1,32 +0,0 @@ -type Polygons { - polygonID: String - dataID: String - name: String - descr: String - polyPop: Int - geoType: String - geoEPSG: String - geoWKT: String - refLink: String - notes: String - dataset: Datasets - measures(filter: MeasuresFilter): [Measures]! - sites(filter: SitesFilter): [Sites]! -} - -input PolygonsFilter { - polygonID: StringFilter - dataID: StringFilter - name: StringFilter - descr: StringFilter - polyPop: IntFilter - geoType: StringFilter - geoEPSG: StringFilter - geoWKT: StringFilter - refLink: StringFilter - notes: StringFilter -} - -extend type Query { - polygons(filter: PolygonsFilter): [Polygons]! -} diff --git a/graphql/schema/qualityReports.graphql b/graphql/schema/qualityReports.graphql new file mode 100644 index 0000000..f500807 --- /dev/null +++ b/graphql/schema/qualityReports.graphql @@ -0,0 +1,25 @@ +input QualityReportsFilter { + quality: StringFilter + measureRepID: StringFilter + sampleID: StringFilter + measureSetRepID: StringFilter + qualityFlag: StringFilter + severity: StringFilter + notes: StringFilter +} + +type QualityReports { + quality: String + measureRepID: String + sampleID: String + measureSetRepID: String + qualityFlag: String + severity: String + notes: String + # measureRepID_measures: Measures + # sampleID_samples: Samples + # measureSetRepID_measureSets: MeasureSets +} +extend type Query { + qualityReports(filter: QualityReportsFilter): [QualityReports]! +} diff --git a/graphql/schema/samples.graphql b/graphql/schema/samples.graphql index 501700c..867a81b 100644 --- a/graphql/schema/samples.graphql +++ b/graphql/schema/samples.graphql @@ -1,12 +1,11 @@ input SamplesFilter { - parSampID: StringFilter - sampID: StringFilter - mSRID: StringFilter - contID: StringFilter + sampleID: StringFilter + protocolID: StringFilter + contactID: StringFilter siteID: StringFilter purposeID: StringFilter saMaterial: StringFilter - dataID: StringFilter + datasetID: StringFilter origin: StringFilter repType: StringFilter collType: StringFilter @@ -24,14 +23,14 @@ input SamplesFilter { } type Samples { - parSampID: String - sampID: String - mSRID: String - contID: String + sampleID: String + protocolID: String + organizationID: String + contactID: String siteID: String purposeID: String saMaterial: String - dataID: String + datasetID: String origin: String repType: String collType: String @@ -43,18 +42,23 @@ type Samples { collDTEnd: DateTime sentDate: DateTime recDate: DateTime - qualityFlag: String + reportable: String lastEdited: DateTime notes: String - parentSample: Samples - methodSet: MethodSets - contact: Contacts - purpose: PartLUs - dataset: Datasets - site: Sites! - measures(filter: MeasuresFilter): [Measures]! + # parentSample: Samples + # contact: Contacts + # dataset: Datasets + # site: Sites! + # measures(filter: MeasuresFilter): [Measures]! } +# type PageSamples { +# total: Int +# items: [Samples] +# } + extend type Query { samples(filter: SamplesFilter): [Samples]! + # getPageSamples(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageSamples + # getFirstSamples(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): Samples } diff --git a/graphql/schema/setLUs.graphql b/graphql/schema/sets.graphql similarity index 52% rename from graphql/schema/setLUs.graphql rename to graphql/schema/sets.graphql index f248eeb..4e099aa 100644 --- a/graphql/schema/setLUs.graphql +++ b/graphql/schema/sets.graphql @@ -1,29 +1,25 @@ -type SetLUs { +type Sets { setID: String setType: String - setValue: String + partID: String partLabel: String - notes: String - partInstr: String status: String - firstRel: String - lastUp: String changes: String + notes: String + # parts(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageParts } -input SetLUsFilter { + +input SetsFilter { setID: StringFilter setType: StringFilter - setValue: StringFilter + partID: StringFilter partLabel: StringFilter - notes: StringFilter - partInstr: StringFilter status: StringFilter - firstRel: StringFilter - lastUp: StringFilter changes: StringFilter + notes: StringFilter } extend type Query { - setLUs(filter: SetLUsFilter): [SetLUs]! + sets(filter: SetsFilter): [Sets]! } diff --git a/graphql/schema/sites.graphql b/graphql/schema/sites.graphql index 4507e8a..e5383e1 100644 --- a/graphql/schema/sites.graphql +++ b/graphql/schema/sites.graphql @@ -1,46 +1,54 @@ input SitesFilter { parSiteID: StringFilter siteID: StringFilter + datasetID: StringFilter polygonID: StringFilter - siteTypeID: StringFilter - samShed: StringFilter - addID: StringFilter - contID: StringFilter - dataID: StringFilter + siteType: StringFilter + sampleShed: StringFilter + addressID: StringFilter + organizationID: StringFilter + contactID: StringFilter name: StringFilter descr: StringFilter - pHDept: StringFilter + repOrg1: StringFilter + repOrg2: StringFilter healthReg: StringFilter popServ: IntFilter geoLat: StringFilter geoLong: StringFilter geoEPSG: StringFilter + lastedEdited: DateTimeFilter notes: StringFilter } type Sites { parSiteID: String siteID: String + datasetID: String polygonID: String - siteTypeID: String - samShed: String - addID: String - contID: String - dataID: String + siteType: String + sampleShed: String + addressID: String + organizationID: String + contactID: String name: String descr: String - pHDept: String + repOrg1: String + repOrg2: String healthReg: String popServ: Int geoLat: String geoLong: String geoEPSG: String + lastedEdited: DateTime notes: String - parentSite: Sites - polygon: Polygons - dataset: Datasets - measures(filter: MeasuresFilter): [Measures]! - samples(filter: SamplesFilter): [Samples]! + # datasetID_datasets: Datasets + # polygonID_polygons: Polygons + # siteType_parts: Parts + # organizationID_organizations: Organizations + # repOrg1_organizations: Organizations + # repOrg2_organizations: Organizations + # measures(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageMeasures } extend type Query { diff --git a/graphql/schema/translationLUs.graphql b/graphql/schema/translationLUs.graphql deleted file mode 100644 index 43b39f4..0000000 --- a/graphql/schema/translationLUs.graphql +++ /dev/null @@ -1,21 +0,0 @@ -type TranslationLUs { - langID: String - partID: String - partLab: String - partDesc: String - partInstr: String - languageLU: LanguageLUs - partLU: PartLUs -} - -input TranslationLUsFilter { - langID: StringFilter - partID: StringFilter - partLab: StringFilter - partDesc: StringFilter - partInstr: StringFilter -} - -extend type Query { - translationLUs(filter: TranslationLUsFilter): [TranslationLUs]! -} diff --git a/graphql/schema/translations.graphql b/graphql/schema/translations.graphql new file mode 100644 index 0000000..e2ee573 --- /dev/null +++ b/graphql/schema/translations.graphql @@ -0,0 +1,25 @@ +type Translations { + lang: String + part: String + partLabel: String + partDesc: String + partInstr: String + changes: String + notes: String + # lang_languages: Languages + # part_parts: Parts +} + +input TranslationsFilter { + lang: StringFilter + part: StringFilter + partLabel: StringFilter + partDesc: StringFilter + partInstr: StringFilter + changes: StringFilter + notes: StringFilter +} + +extend type Query { + translations(filter: TranslationsFilter): [Translations]! +} diff --git a/graphql/schema/zones.graphql b/graphql/schema/zones.graphql new file mode 100644 index 0000000..9ce54c4 --- /dev/null +++ b/graphql/schema/zones.graphql @@ -0,0 +1,16 @@ +type Zones { + isoCode: String + isoZone: String + zoneName: String +# isoCode_countries: Countries +# addresses(filter: String, pagination: String, where: Condition, _debug: Boolean, _cache: Boolean): PageAddresses +} +input ZonesFilter { + isoCode: StringFilter + isoZone: StringFilter + zoneName: String +} + +extend type Query { + zones(filter: ZonesFilter): [Zones]! +} diff --git a/host.json b/host.json index 56c82a8..5877b52 100644 --- a/host.json +++ b/host.json @@ -16,5 +16,6 @@ "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[3.*, 4.0.0)" - } + }, + "functionTimeout": "00:10:00" } \ No newline at end of file