diff --git a/graphql/api/relationships.ts b/graphql/api/relationships.ts index 845a70d..69cac3b 100644 --- a/graphql/api/relationships.ts +++ b/graphql/api/relationships.ts @@ -27,7 +27,7 @@ import { TableRelationships } from './types'; * "StandardCurve", * "countries", * "zones", - * "healthregleveldata", + * "TownLevelDataTrend", * "provinceleveldata", * "canadaleveldata", * @@ -58,7 +58,7 @@ export const tables = [ 'StandardCurve', 'countries', 'zones', - "healthregleveldata", + "TownLevelDataTrend", "provinceleveldata", "canadaleveldata", ] as const; diff --git a/graphql/resolvers.ts b/graphql/resolvers.ts index 8deda33..f414a0e 100644 --- a/graphql/resolvers.ts +++ b/graphql/resolvers.ts @@ -120,7 +120,7 @@ const resolvers: Resolvers = { StandardCurve: withParentResolver('StandardCurve')(({ single }) => ({})), Countries: withParentResolver('countries')(({ single }) => ({})), Zones: withParentResolver('zones')(({ single }) => ({})), - healthregleveldata: withParentResolver('healthregleveldata')(({ single }) => ({})), + TownLevelDataTrend: withParentResolver('TownLevelDataTrend')(({ single }) => ({})), provinceleveldata: withParentResolver('provinceleveldata')(({ single }) => ({})), canadaleveldata: withParentResolver('canadaleveldata')(({ single }) => ({})), @@ -149,7 +149,7 @@ const resolvers: Resolvers = { StandardCurve: apiResolver('StandardCurve'), countries: apiResolver('countries'), zones: apiResolver('zones'), - healthregleveldata: apiResolver('healthregleveldata'), + TownLevelDataTrend: apiResolver('TownLevelDataTrend'), provinceleveldata: apiResolver('provinceleveldata'), canadaleveldata: apiResolver('canadaleveldata'), }, diff --git a/graphql/schema/healthregleveldata.graphql b/graphql/schema/healthregleveldata.graphql deleted file mode 100644 index aca4867..0000000 --- a/graphql/schema/healthregleveldata.graphql +++ /dev/null @@ -1,18 +0,0 @@ -input healthregleveldataFilter { - date: DateTimeFilter - region: StringFilter - measureid: StringFilter - weighted_avg_HR: FloatFilter - -} - -type healthregleveldata { - date: DateTime - region: String - measureid: String - weighted_avg_HR: Float -} - -extend type Query { - healthregleveldata(filter: healthregleveldataFilter): [healthregleveldata]! -} diff --git a/graphql/schema/townleveldatatrend.graphql b/graphql/schema/townleveldatatrend.graphql new file mode 100644 index 0000000..db25fc5 --- /dev/null +++ b/graphql/schema/townleveldatatrend.graphql @@ -0,0 +1,27 @@ +input TownLevelDataTrendFilter { + fractionid: StringFilter + region: StringFilter + location: StringFilter + measureid: StringFilter + LatestValue: FloatFilter + LatestTrend: StringFilter + t_low: FloatFilter + t_high: FloatFilter + LatestLevel: StringFilter +} + +type TownLevelDataTrend { + fractionid: String + region: String + location: String + measureid: String + LatestValue: Float + LatestTrend: String + t_low: Float + t_high: Float + LatestLevel: String +} + +extend type Query { + TownLevelDataTrend(filter: TownLevelDataTrendFilter): [TownLevelDataTrend]! +}