@@ -107,28 +107,28 @@ const QueryType = new GraphQLObjectType({
107107
108108test ( 'creates one type per data type' , ( ) => {
109109 const typeMap = getSchemaFromData (
110- data
110+ data ,
111111 ) . getTypeMap ( ) as ObjMap < GraphQLObjectType > ;
112112 expect ( typeMap . Post . name ) . toEqual ( PostType . name ) ;
113113 expect ( Object . keys ( typeMap . Post . getFields ( ) ) ) . toEqual (
114- Object . keys ( PostType . getFields ( ) )
114+ Object . keys ( PostType . getFields ( ) ) ,
115115 ) ;
116116 expect ( typeMap . User . name ) . toEqual ( UserType . name ) ;
117117 expect ( Object . keys ( typeMap . User . getFields ( ) ) ) . toEqual (
118- Object . keys ( UserType . getFields ( ) )
118+ Object . keys ( UserType . getFields ( ) ) ,
119119 ) ;
120120} ) ;
121121
122122test ( 'creates one field per relationship' , ( ) => {
123123 const typeMap = getSchemaFromData (
124- data
124+ data ,
125125 ) . getTypeMap ( ) as ObjMap < GraphQLObjectType > ;
126126 expect ( Object . keys ( typeMap . Post . getFields ( ) ) ) . toContain ( 'User' ) ;
127127} ) ;
128128
129129test ( 'creates one field per reverse relationship' , ( ) => {
130130 const typeMap = getSchemaFromData (
131- data
131+ data ,
132132 ) . getTypeMap ( ) as ObjMap < GraphQLObjectType > ;
133133 expect ( Object . keys ( typeMap . User . getFields ( ) ) ) . toContain ( 'Posts' ) ;
134134} ) ;
@@ -137,7 +137,7 @@ test('creates three query fields per data type', () => {
137137 // biome-ignore lint/style/noNonNullAssertion: It's only a test
138138 const queries = getSchemaFromData ( data ) . getQueryType ( ) ! . getFields ( ) ;
139139 expect ( ( queries . Post . type as GraphQLObjectType ) . name ) . toEqual (
140- PostType . name
140+ PostType . name ,
141141 ) ;
142142 expect ( queries . Post . args ) . toEqual ( [
143143 expect . objectContaining ( {
@@ -159,7 +159,7 @@ test('creates three query fields per data type', () => {
159159 expect ( queries . _allPostsMeta . type . toString ( ) ) . toEqual ( 'ListMetadata' ) ;
160160
161161 expect ( ( queries . User . type as GraphQLObjectType ) . name ) . toEqual (
162- UserType . name
162+ UserType . name ,
163163 ) ;
164164 expect ( queries . User . args ) . toEqual ( [
165165 expect . objectContaining ( {
@@ -185,7 +185,7 @@ test('creates three mutation fields per data type', () => {
185185 // biome-ignore lint/style/noNonNullAssertion: It's only a test
186186 const mutations = getSchemaFromData ( data ) . getMutationType ( ) ! . getFields ( ) ;
187187 expect ( ( mutations . createPost . type as GraphQLObjectType ) . name ) . toEqual (
188- PostType . name
188+ PostType . name ,
189189 ) ;
190190 expect ( mutations . createPost . args ) . toEqual ( [
191191 expect . objectContaining ( {
@@ -202,7 +202,7 @@ test('creates three mutation fields per data type', () => {
202202 } ) ,
203203 ] ) ;
204204 expect ( ( mutations . updatePost . type as GraphQLObjectType ) . name ) . toEqual (
205- PostType . name
205+ PostType . name ,
206206 ) ;
207207 expect ( mutations . updatePost . args ) . toEqual ( [
208208 expect . objectContaining ( {
@@ -223,7 +223,7 @@ test('creates three mutation fields per data type', () => {
223223 } ) ,
224224 ] ) ;
225225 expect ( ( mutations . removePost . type as GraphQLObjectType ) . name ) . toEqual (
226- PostType . name
226+ PostType . name ,
227227 ) ;
228228 expect ( mutations . removePost . args ) . toEqual ( [
229229 expect . objectContaining ( {
@@ -232,7 +232,7 @@ test('creates three mutation fields per data type', () => {
232232 } ) ,
233233 ] ) ;
234234 expect ( ( mutations . createUser . type as GraphQLObjectType ) . name ) . toEqual (
235- UserType . name
235+ UserType . name ,
236236 ) ;
237237 expect ( mutations . createUser . args ) . toEqual ( [
238238 expect . objectContaining ( {
@@ -241,7 +241,7 @@ test('creates three mutation fields per data type', () => {
241241 } ) ,
242242 ] ) ;
243243 expect ( ( mutations . updateUser . type as GraphQLObjectType ) . name ) . toEqual (
244- UserType . name
244+ UserType . name ,
245245 ) ;
246246 expect ( mutations . updateUser . args ) . toEqual ( [
247247 expect . objectContaining ( {
@@ -254,7 +254,7 @@ test('creates three mutation fields per data type', () => {
254254 } ) ,
255255 ] ) ;
256256 expect ( ( mutations . removeUser . type as GraphQLObjectType ) . name ) . toEqual (
257- UserType . name
257+ UserType . name ,
258258 ) ;
259259 expect ( mutations . removeUser . args ) . toEqual ( [
260260 expect . objectContaining ( {
@@ -269,22 +269,22 @@ test('creates the mutation *Input type for createMany', () => {
269269 const mutations = getSchemaFromData ( data ) . getMutationType ( ) ! . getFields ( ) ;
270270 const createManyPostInputType = mutations . createManyPost . args [ 0 ] . type ;
271271 expect ( createManyPostInputType . toString ( ) ) . toEqual ( '[PostInput]' ) ;
272- expect ( ( createManyPostInputType as GraphQLList < any > ) . ofType . getFields ( ) ) . toEqual (
273- {
274- title : expect . objectContaining ( {
275- type : new GraphQLNonNull ( GraphQLString ) ,
276- name : 'title' ,
277- } ) ,
278- views : expect . objectContaining ( {
279- type : new GraphQLNonNull ( GraphQLInt ) ,
280- name : 'views' ,
281- } ) ,
282- user_id : expect . objectContaining ( {
283- type : new GraphQLNonNull ( GraphQLID ) ,
284- name : 'user_id' ,
285- } ) ,
286- }
287- ) ;
272+ expect (
273+ ( createManyPostInputType as GraphQLList < any > ) . ofType . getFields ( ) ,
274+ ) . toEqual ( {
275+ title : expect . objectContaining ( {
276+ type : new GraphQLNonNull ( GraphQLString ) ,
277+ name : 'title' ,
278+ } ) ,
279+ views : expect . objectContaining ( {
280+ type : new GraphQLNonNull ( GraphQLInt ) ,
281+ name : 'views' ,
282+ } ) ,
283+ user_id : expect . objectContaining ( {
284+ type : new GraphQLNonNull ( GraphQLID ) ,
285+ name : 'user_id' ,
286+ } ) ,
287+ } ) ;
288288} ) ;
289289
290290test ( 'pluralizes and capitalizes correctly' , ( ) => {
0 commit comments