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

    8.2.3 • 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

    Install

    npm i nestjs-graphql-relay

    DownloadsWeekly Downloads

    603

    Version

    8.2.3

    License

    MIT

    Unpacked Size

    28.5 kB

    Total Files

    21

    Last publish

    Collaborators

    • 9renpoto
    • yasai-t
    • abyssparanoia