@@ -120,35 +120,31 @@ describe('Type System: Example', () => {
120
120
121
121
expect ( BlogSchema . getQueryType ( ) ) . to . equal ( BlogQuery ) ;
122
122
123
- const articleField = BlogQuery . getFields ( ) [ ( 'article' : string ) ] ;
123
+ const articleField = BlogQuery . getFields ( ) [ 'article' ] ;
124
124
expect ( articleField && articleField . type ) . to . equal ( BlogArticle ) ;
125
125
expect ( articleField && articleField . type . name ) . to . equal ( 'Article' ) ;
126
126
expect ( articleField && articleField . name ) . to . equal ( 'article' ) ;
127
127
128
128
const articleFieldType = articleField ? articleField . type : null ;
129
129
130
130
const titleField =
131
- isObjectType ( articleFieldType ) &&
132
- articleFieldType . getFields ( ) [ ( 'title' : string ) ] ;
131
+ isObjectType ( articleFieldType ) && articleFieldType . getFields ( ) [ 'title' ] ;
133
132
expect ( titleField && titleField . name ) . to . equal ( 'title' ) ;
134
133
expect ( titleField && titleField . type ) . to . equal ( GraphQLString ) ;
135
134
expect ( titleField && titleField . type . name ) . to . equal ( 'String' ) ;
136
135
137
136
const authorField =
138
- isObjectType ( articleFieldType ) &&
139
- articleFieldType . getFields ( ) [ ( 'author' : string ) ] ;
137
+ isObjectType ( articleFieldType ) && articleFieldType . getFields ( ) [ 'author' ] ;
140
138
141
139
const authorFieldType = authorField ? authorField . type : null ;
142
140
const recentArticleField =
143
141
isObjectType ( authorFieldType ) &&
144
- authorFieldType . getFields ( ) [ ( 'recentArticle' : string ) ] ;
142
+ authorFieldType . getFields ( ) [ 'recentArticle' ] ;
145
143
146
144
expect ( recentArticleField && recentArticleField . type ) . to . equal ( BlogArticle ) ;
147
145
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 ) ;
152
148
expect ( feedField && feedField . name ) . to . equal ( 'feed' ) ;
153
149
} ) ;
154
150
@@ -160,7 +156,7 @@ describe('Type System: Example', () => {
160
156
161
157
expect ( BlogSchema . getMutationType ( ) ) . to . equal ( BlogMutation ) ;
162
158
163
- const writeMutation = BlogMutation . getFields ( ) [ ( 'writeArticle' : string ) ] ;
159
+ const writeMutation = BlogMutation . getFields ( ) [ 'writeArticle' ] ;
164
160
expect ( writeMutation && writeMutation . type ) . to . equal ( BlogArticle ) ;
165
161
expect ( writeMutation && writeMutation . type . name ) . to . equal ( 'Article' ) ;
166
162
expect ( writeMutation && writeMutation . name ) . to . equal ( 'writeArticle' ) ;
@@ -174,7 +170,7 @@ describe('Type System: Example', () => {
174
170
175
171
expect ( BlogSchema . getSubscriptionType ( ) ) . to . equal ( BlogSubscription ) ;
176
172
177
- const sub = BlogSubscription . getFields ( ) [ ( 'articleSubscribe' : string ) ] ;
173
+ const sub = BlogSubscription . getFields ( ) [ 'articleSubscribe' ] ;
178
174
expect ( sub && sub . type ) . to . equal ( BlogArticle ) ;
179
175
expect ( sub && sub . type . name ) . to . equal ( 'Article' ) ;
180
176
expect ( sub && sub . name ) . to . equal ( 'articleSubscribe' ) ;
0 commit comments