File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
packages/graphql-playground/src/components/Playground Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,17 @@ export class GraphQLEditor extends React.PureComponent<
336
336
this . storageSet ( 'variableEditorHeight' , this . state . variableEditorHeight )
337
337
}
338
338
339
+ getHeaderCount ( ) {
340
+ try {
341
+ const headers = JSON . parse ( this . props . session . headers ! )
342
+ return `(${ Object . keys ( headers ) . length } )`
343
+ } catch ( e ) {
344
+ //
345
+ }
346
+
347
+ return ''
348
+ }
349
+
339
350
render ( ) {
340
351
const children = React . Children . toArray ( this . props . children )
341
352
const footer = find ( children , child => child . type === GraphQLEditor . Footer )
@@ -516,7 +527,7 @@ export class GraphQLEditor extends React.PureComponent<
516
527
ref = { this . setHttpHeadersRef }
517
528
onClick = { this . selectHttpHeaders }
518
529
>
519
- { 'HTTP Headers' }
530
+ { 'HTTP Headers ' + this . getHeaderCount ( ) }
520
531
</ span >
521
532
</ div >
522
533
{ this . state . queryVariablesActive ? (
You can’t perform that action at this time.
0 commit comments