Nest.js + typeorm + graphql-relay inspired nestjs-graphql-relay
npm install nestjs-graphql-relay
@ObjectType({ isAbstract: true })
abstract class RecipesEdge implements Relay.Edge<Recipe> {
@Field(() => Recipe)
readonly node: Recipe;
@Field()
readonly cursor: Relay.ConnectionCursor;
}
@ObjectType()
export class RecipesConnection implements Relay.Connection<Recipe> {
@Field()
readonly pageInfo: PageInfo;
@Field(() => [RecipesEdge])
readonly edges: Array<Relay.Edge<Recipe>>;
}
PRs accepted.
MIT © g59