/
githubmirror
/
nest
Обзор
Документация
Войти
/
githubmirror
/
nest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
sample/31-graphql-federation-code-first/posts-application/src/posts/models/user.model.ts
14 строк
307 B
Jan Krueger
refactor: fix wrong dir naming for graphql federation samples
09 июл 2021, 17:56
09 июл 2021, 17:56
a0557c7
Код
Авторство
О чём код?
import { Directive, Field, ID, ObjectType } from '@nestjs/graphql'; import { Post } from './post.model'; @ObjectType() @Directive('@extends') @Directive('@key(fields: "id")') export class User { @Field((type) => ID) @Directive('@external') id: number; @Field((type) => [Post]) posts?: Post[]; }