55
66
77import 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+ }
1025
1126
1227declare global {
@@ -25,6 +40,7 @@ export interface NexusGenScalars {
2540 Float : number
2641 Boolean : boolean
2742 ID : string
43+ DateTime : any
2844}
2945
3046export interface NexusGenObjects {
@@ -33,6 +49,7 @@ export interface NexusGenObjects {
3349 user : NexusGenRootTypes [ 'User' ] ; // User!
3450 }
3551 Link : { // root type
52+ createdAt : NexusGenScalars [ 'DateTime' ] ; // DateTime!
3653 description : string ; // String!
3754 id : number ; // Int!
3855 url : string ; // String!
@@ -44,6 +61,10 @@ export interface NexusGenObjects {
4461 id : number ; // Int!
4562 name : string ; // String!
4663 }
64+ Vote : { // root type
65+ link : NexusGenRootTypes [ 'Link' ] ; // Link!
66+ user : NexusGenRootTypes [ 'User' ] ; // User!
67+ }
4768}
4869
4970export interface NexusGenInterfaces {
@@ -62,15 +83,18 @@ export interface NexusGenFieldTypes {
6283 user : NexusGenRootTypes [ 'User' ] ; // User!
6384 }
6485 Link : { // field return type
86+ createdAt : NexusGenScalars [ 'DateTime' ] ; // DateTime!
6587 description : string ; // String!
6688 id : number ; // Int!
6789 postedBy : NexusGenRootTypes [ 'User' ] | null ; // User
6890 url : string ; // String!
91+ voters : NexusGenRootTypes [ 'User' ] [ ] ; // [User!]!
6992 }
7093 Mutation : { // field return type
7194 login : NexusGenRootTypes [ 'AuthPayload' ] ; // AuthPayload!
7295 post : NexusGenRootTypes [ 'Link' ] ; // Link!
7396 signup : NexusGenRootTypes [ 'AuthPayload' ] ; // AuthPayload!
97+ vote : NexusGenRootTypes [ 'Vote' ] | null ; // Vote
7498 }
7599 Query : { // field return type
76100 feed : NexusGenRootTypes [ 'Link' ] [ ] ; // [Link!]!
@@ -80,6 +104,11 @@ export interface NexusGenFieldTypes {
80104 id : number ; // Int!
81105 links : NexusGenRootTypes [ 'Link' ] [ ] ; // [Link!]!
82106 name : string ; // String!
107+ votes : NexusGenRootTypes [ 'Link' ] [ ] ; // [Link!]!
108+ }
109+ Vote : { // field return type
110+ link : NexusGenRootTypes [ 'Link' ] ; // Link!
111+ user : NexusGenRootTypes [ 'User' ] ; // User!
83112 }
84113}
85114
@@ -89,15 +118,18 @@ export interface NexusGenFieldTypeNames {
89118 user : 'User'
90119 }
91120 Link : { // field return type name
121+ createdAt : 'DateTime'
92122 description : 'String'
93123 id : 'Int'
94124 postedBy : 'User'
95125 url : 'String'
126+ voters : 'User'
96127 }
97128 Mutation : { // field return type name
98129 login : 'AuthPayload'
99130 post : 'Link'
100131 signup : 'AuthPayload'
132+ vote : 'Vote'
101133 }
102134 Query : { // field return type name
103135 feed : 'Link'
@@ -107,6 +139,11 @@ export interface NexusGenFieldTypeNames {
107139 id : 'Int'
108140 links : 'Link'
109141 name : 'String'
142+ votes : 'Link'
143+ }
144+ Vote : { // field return type name
145+ link : 'Link'
146+ user : 'User'
110147 }
111148}
112149
@@ -125,6 +162,9 @@ export interface NexusGenArgTypes {
125162 name : string ; // String!
126163 password : string ; // String!
127164 }
165+ vote : { // args
166+ linkId : number ; // Int!
167+ }
128168 }
129169}
130170
0 commit comments