5
5
6
6
7
7
import type { Context } from "./src/context"
8
-
9
-
8
+ import type { core } from "nexus"
9
+ declare global {
10
+ interface NexusGenCustomInputMethods < TypeName extends string > {
11
+ /**
12
+ * A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
13
+ */
14
+ dateTime < FieldName extends string > ( fieldName : FieldName , opts ?: core . CommonInputFieldConfig < TypeName , FieldName > ) : void // "DateTime";
15
+ }
16
+ }
17
+ declare global {
18
+ interface NexusGenCustomOutputMethods < TypeName extends string > {
19
+ /**
20
+ * A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
21
+ */
22
+ dateTime < FieldName extends string > ( fieldName : FieldName , ...opts : core . ScalarOutSpread < TypeName , FieldName > ) : void // "DateTime";
23
+ }
24
+ }
10
25
11
26
12
27
declare global {
@@ -25,6 +40,7 @@ export interface NexusGenScalars {
25
40
Float : number
26
41
Boolean : boolean
27
42
ID : string
43
+ DateTime : any
28
44
}
29
45
30
46
export interface NexusGenObjects {
@@ -33,6 +49,7 @@ export interface NexusGenObjects {
33
49
user : NexusGenRootTypes [ 'User' ] ; // User!
34
50
}
35
51
Link : { // root type
52
+ createdAt : NexusGenScalars [ 'DateTime' ] ; // DateTime!
36
53
description : string ; // String!
37
54
id : number ; // Int!
38
55
url : string ; // String!
@@ -44,6 +61,10 @@ export interface NexusGenObjects {
44
61
id : number ; // Int!
45
62
name : string ; // String!
46
63
}
64
+ Vote : { // root type
65
+ link : NexusGenRootTypes [ 'Link' ] ; // Link!
66
+ user : NexusGenRootTypes [ 'User' ] ; // User!
67
+ }
47
68
}
48
69
49
70
export interface NexusGenInterfaces {
@@ -62,15 +83,18 @@ export interface NexusGenFieldTypes {
62
83
user : NexusGenRootTypes [ 'User' ] ; // User!
63
84
}
64
85
Link : { // field return type
86
+ createdAt : NexusGenScalars [ 'DateTime' ] ; // DateTime!
65
87
description : string ; // String!
66
88
id : number ; // Int!
67
89
postedBy : NexusGenRootTypes [ 'User' ] | null ; // User
68
90
url : string ; // String!
91
+ voters : NexusGenRootTypes [ 'User' ] [ ] ; // [User!]!
69
92
}
70
93
Mutation : { // field return type
71
94
login : NexusGenRootTypes [ 'AuthPayload' ] ; // AuthPayload!
72
95
post : NexusGenRootTypes [ 'Link' ] ; // Link!
73
96
signup : NexusGenRootTypes [ 'AuthPayload' ] ; // AuthPayload!
97
+ vote : NexusGenRootTypes [ 'Vote' ] | null ; // Vote
74
98
}
75
99
Query : { // field return type
76
100
feed : NexusGenRootTypes [ 'Link' ] [ ] ; // [Link!]!
@@ -80,6 +104,11 @@ export interface NexusGenFieldTypes {
80
104
id : number ; // Int!
81
105
links : NexusGenRootTypes [ 'Link' ] [ ] ; // [Link!]!
82
106
name : string ; // String!
107
+ votes : NexusGenRootTypes [ 'Link' ] [ ] ; // [Link!]!
108
+ }
109
+ Vote : { // field return type
110
+ link : NexusGenRootTypes [ 'Link' ] ; // Link!
111
+ user : NexusGenRootTypes [ 'User' ] ; // User!
83
112
}
84
113
}
85
114
@@ -89,15 +118,18 @@ export interface NexusGenFieldTypeNames {
89
118
user : 'User'
90
119
}
91
120
Link : { // field return type name
121
+ createdAt : 'DateTime'
92
122
description : 'String'
93
123
id : 'Int'
94
124
postedBy : 'User'
95
125
url : 'String'
126
+ voters : 'User'
96
127
}
97
128
Mutation : { // field return type name
98
129
login : 'AuthPayload'
99
130
post : 'Link'
100
131
signup : 'AuthPayload'
132
+ vote : 'Vote'
101
133
}
102
134
Query : { // field return type name
103
135
feed : 'Link'
@@ -107,6 +139,11 @@ export interface NexusGenFieldTypeNames {
107
139
id : 'Int'
108
140
links : 'Link'
109
141
name : 'String'
142
+ votes : 'Link'
143
+ }
144
+ Vote : { // field return type name
145
+ link : 'Link'
146
+ user : 'User'
110
147
}
111
148
}
112
149
@@ -125,6 +162,9 @@ export interface NexusGenArgTypes {
125
162
name : string ; // String!
126
163
password : string ; // String!
127
164
}
165
+ vote : { // args
166
+ linkId : number ; // Int!
167
+ }
128
168
}
129
169
}
130
170
0 commit comments