nestjs-graphql-relay
TypeScript icon, indicating that this package has built-in type declarations

10.5.0 • Public • Published

nestjs-graphql-relay

Actions Status npm version

Nest.js + typeorm + graphql-relay inspired nestjs-graphql-relay

Install

npm install nestjs-graphql-relay

Usage

example resolver

@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>>;
}

Contributing

PRs accepted.

License

MIT © g59

Package Sidebar

Install

npm i nestjs-graphql-relay

Weekly Downloads

1,358

Version

10.5.0

License

MIT

Unpacked Size

26.2 kB

Total Files

21

Last publish

Collaborators

  • 9renpoto
  • yasai-t
  • abyssparanoia