@@ -120,35 +120,31 @@ describe('Type System: Example', () => {
120120
121121 expect ( BlogSchema . getQueryType ( ) ) . to . equal ( BlogQuery ) ;
122122
123- const articleField = BlogQuery . getFields ( ) [ ( 'article' : string ) ] ;
123+ const articleField = BlogQuery . getFields ( ) [ 'article' ] ;
124124 expect ( articleField && articleField . type ) . to . equal ( BlogArticle ) ;
125125 expect ( articleField && articleField . type . name ) . to . equal ( 'Article' ) ;
126126 expect ( articleField && articleField . name ) . to . equal ( 'article' ) ;
127127
128128 const articleFieldType = articleField ? articleField . type : null ;
129129
130130 const titleField =
131- isObjectType ( articleFieldType ) &&
132- articleFieldType . getFields ( ) [ ( 'title' : string ) ] ;
131+ isObjectType ( articleFieldType ) && articleFieldType . getFields ( ) [ 'title' ] ;
133132 expect ( titleField && titleField . name ) . to . equal ( 'title' ) ;
134133 expect ( titleField && titleField . type ) . to . equal ( GraphQLString ) ;
135134 expect ( titleField && titleField . type . name ) . to . equal ( 'String' ) ;
136135
137136 const authorField =
138- isObjectType ( articleFieldType ) &&
139- articleFieldType . getFields ( ) [ ( 'author' : string ) ] ;
137+ isObjectType ( articleFieldType ) && articleFieldType . getFields ( ) [ 'author' ] ;
140138
141139 const authorFieldType = authorField ? authorField . type : null ;
142140 const recentArticleField =
143141 isObjectType ( authorFieldType ) &&
144- authorFieldType . getFields ( ) [ ( 'recentArticle' : string ) ] ;
142+ authorFieldType . getFields ( ) [ 'recentArticle' ] ;
145143
146144 expect ( recentArticleField && recentArticleField . type ) . to . equal ( BlogArticle ) ;
147145
148- const feedField = BlogQuery . getFields ( ) [ ( 'feed' : string ) ] ;
149- expect ( feedField && ( feedField . type : GraphQLList ) . ofType ) . to . equal (
150- BlogArticle ,
151- ) ;
146+ const feedField = BlogQuery . getFields ( ) [ 'feed' ] ;
147+ expect ( feedField && feedField . type . ofType ) . to . equal ( BlogArticle ) ;
152148 expect ( feedField && feedField . name ) . to . equal ( 'feed' ) ;
153149 } ) ;
154150
@@ -160,7 +156,7 @@ describe('Type System: Example', () => {
160156
161157 expect ( BlogSchema . getMutationType ( ) ) . to . equal ( BlogMutation ) ;
162158
163- const writeMutation = BlogMutation . getFields ( ) [ ( 'writeArticle' : string ) ] ;
159+ const writeMutation = BlogMutation . getFields ( ) [ 'writeArticle' ] ;
164160 expect ( writeMutation && writeMutation . type ) . to . equal ( BlogArticle ) ;
165161 expect ( writeMutation && writeMutation . type . name ) . to . equal ( 'Article' ) ;
166162 expect ( writeMutation && writeMutation . name ) . to . equal ( 'writeArticle' ) ;
@@ -174,7 +170,7 @@ describe('Type System: Example', () => {
174170
175171 expect ( BlogSchema . getSubscriptionType ( ) ) . to . equal ( BlogSubscription ) ;
176172
177- const sub = BlogSubscription . getFields ( ) [ ( 'articleSubscribe' : string ) ] ;
173+ const sub = BlogSubscription . getFields ( ) [ 'articleSubscribe' ] ;
178174 expect ( sub && sub . type ) . to . equal ( BlogArticle ) ;
179175 expect ( sub && sub . type . name ) . to . equal ( 'Article' ) ;
180176 expect ( sub && sub . name ) . to . equal ( 'articleSubscribe' ) ;
0 commit comments