Skip to content

Commit ab5192f

Browse files
authored
Merge pull request #2 from madscience/explicit-gql-types
Provide explicit types for GQL.Fields()
2 parents ecce695 + e521dbe commit ab5192f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/type/ConnectionArgs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import * as GQL from 'type-graphql';
22

33
@GQL.ArgsType()
44
export class ConnectionArgs {
5-
@GQL.Field({
5+
@GQL.Field(_type => String, {
66
nullable: true,
77
description: 'Retrieve page of edges before opaque cursor.',
88
})
99
public before?: string;
1010

11-
@GQL.Field({
11+
@GQL.Field(_type => String, {
1212
nullable: true,
1313
description: 'Retrieve page of edges after opaque cursor.',
1414
})

src/type/PageInfo.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ import * as GQL from 'type-graphql';
33

44
@GQL.ObjectType()
55
export class PageInfo implements Relay.PageInfo {
6-
@GQL.Field()
6+
@GQL.Field(_type => Boolean)
77
public hasNextPage!: boolean;
88

9-
@GQL.Field()
9+
@GQL.Field(_type => Boolean)
1010
public hasPreviousPage!: boolean;
1111

12-
@GQL.Field({ nullable: true })
12+
@GQL.Field(_type => String, { nullable: true })
1313
public startCursor?: string | null;
1414

15-
@GQL.Field({ nullable: true })
15+
@GQL.Field(_type => String, { nullable: true })
1616
public endCursor?: string | null;
1717

1818
@GQL.Field(_type => GQL.Int, { nullable: true })

0 commit comments

Comments
 (0)