Skip to content

Commit

Permalink
Merge pull request #206 from UN-OCHA/release/v4.5.0
Browse files Browse the repository at this point in the history
📦️ Prepare release `v4.5.0` and deploy to stage
  • Loading branch information
Pl217 authored Sep 11, 2023
2 parents 2226be5 + 2458a6d commit b9d6ba6
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hpc-api",
"version": "4.4.1",
"version": "4.5.0",
"description": "api for HPC applications",
"main": "src/server.ts",
"license": "MIT",
Expand Down
15 changes: 15 additions & 0 deletions src/domain-services/software-info/graphql/resolver.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import SoftwareInfo from './types';
import { Service } from 'typedi';
import { Query, Resolver } from 'type-graphql';
import { SoftwareInfoService } from '../software-info-service';

@Service()
@Resolver(SoftwareInfo)
export default class SoftwareInfoResolver {
constructor(private softwareInfoService: SoftwareInfoService) {}

@Query(() => [SoftwareInfo])
softwareInfo(): SoftwareInfo[] {
return this.softwareInfoService.getSoftwareInfo();
}
}
13 changes: 13 additions & 0 deletions src/domain-services/software-info/graphql/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Field, ObjectType } from 'type-graphql';

@ObjectType()
export default class SoftwareInfo {
@Field({ nullable: false })
title: string;

@Field({ nullable: false })
status: string;

@Field({ nullable: false })
version: string;
}
16 changes: 16 additions & 0 deletions src/domain-services/software-info/software-info-service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Service } from 'typedi';
import SoftwareInfo from './graphql/types';
import { version } from '../../../package.json';

@Service()
export class SoftwareInfoService {
getSoftwareInfo(): SoftwareInfo[] {
return [
{
title: 'HPC GraphQL API',
status: 'Stable',
version,
},
];
}
}
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,9 @@ apollo-reporting-protobuf@^3.4.0:
"@apollo/protobufjs" "1.2.6"

apollo-server-core@^3.12.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-3.12.0.tgz#8aa2a7329ce6fe1823290c45168c749db01548df"
integrity sha512-hq7iH6Cgldgmnjs9FVSZeKWRpi0/ZR+iJ1arzeD2VXGxxgk1mAm/cz1Tx0TYgegZI+FvvrRl0UhKEx7sLnIxIg==
version "3.12.1"
resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-3.12.1.tgz#ba255c37345db29c48a2e0c064c519a8d62eb5af"
integrity sha512-9SF5WAkkV0FZQ2HVUWI9Jada1U0jg7e8NCN9EklbtvaCeUlOLyXyM+KCWuZ7+dqHxjshbtcwylPHutt3uzoNkw==
dependencies:
"@apollo/utils.keyvaluecache" "^1.0.1"
"@apollo/utils.logger" "^1.0.0"
Expand Down

0 comments on commit b9d6ba6

Please sign in to comment.