Skip to content
This repository was archived by the owner on Mar 28, 2024. It is now read-only.

Commit af1805f

Browse files
committed
feat: add graphql object types to podcast
1 parent f3169e9 commit af1805f

File tree

6 files changed

+18
-33
lines changed

6 files changed

+18
-33
lines changed

Diff for: .github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: coder2000
2+
liberapay: coder2000

Diff for: ormconfig.json

-14
This file was deleted.

Diff for: package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"workspaces": [
55
"packages/*"
66
],
7-
"scripts": {}
7+
"scripts": {},
8+
"nohoist": [
9+
"**/typeorm/**",
10+
"**/typeorm"
11+
]
812
}

Diff for: packages/server/ormconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"database": "database.sqlite",
44
"synchronize": false,
55
"logging": false,
6-
"entities": ["src/db/entities/**/*.ts"],
6+
"entities": ["src/db/entities/**/*.entity.ts"],
77
"migrations": ["src/db/migrations/**/*.ts"],
88
"subscribers": ["src/db/subscriber/**/*.ts"],
99
"cli": {

Diff for: packages/server/src/db/entities/podcast.entity.ts

+9
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,40 @@ import {
66
OneToMany,
77
PrimaryGeneratedColumn,
88
} from 'typeorm';
9+
import { Field, ObjectType } from '@nestjs/graphql';
910
import { Author } from './author.entity';
1011
import { Episode } from './episode.entity';
1112
import { Category } from './category.entity';
1213

1314
@Entity()
15+
@ObjectType()
1416
export class Podcast {
1517
@PrimaryGeneratedColumn()
18+
@Field()
1619
id: number;
1720

1821
@Column()
22+
@Field()
1923
title: string;
2024

2125
@Column()
26+
@Field()
2227
description: string;
2328

2429
@Column()
30+
@Field()
2531
image: string;
2632

2733
@Column()
34+
@Field()
2835
language: string;
2936

3037
@Column()
38+
@Field()
3139
link: string;
3240

3341
@Column()
42+
@Field()
3443
explicit: boolean;
3544

3645
@ManyToOne((type) => Author, (author) => author.podcasts)

Diff for: yarn.lock

+1-17
Original file line numberDiff line numberDiff line change
@@ -7733,22 +7733,6 @@ node-notifier@^6.0.0:
77337733
shellwords "^0.1.1"
77347734
which "^1.3.1"
77357735

7736-
node-pre-gyp@*:
7737-
version "0.14.0"
7738-
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
7739-
integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
7740-
dependencies:
7741-
detect-libc "^1.0.2"
7742-
mkdirp "^0.5.1"
7743-
needle "^2.2.1"
7744-
nopt "^4.0.1"
7745-
npm-packlist "^1.1.6"
7746-
npmlog "^4.0.2"
7747-
rc "^1.2.7"
7748-
rimraf "^2.6.1"
7749-
semver "^5.3.0"
7750-
tar "^4.4.2"
7751-
77527736
node-pre-gyp@^0.11.0:
77537737
version "0.11.0"
77547738
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz#db1f33215272f692cd38f03238e3e9b47c5dd054"
@@ -10401,7 +10385,7 @@ tapable@^1.0.0, tapable@^1.1.3:
1040110385
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
1040210386
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
1040310387

10404-
tar@^4, tar@^4.4.2:
10388+
tar@^4:
1040510389
version "4.4.13"
1040610390
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
1040710391
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==

0 commit comments

Comments
 (0)