Skip to content

Commit d1b4851

Browse files
committed
fix: add doc wrapper
1 parent d199a94 commit d1b4851

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as React from 'react';
2+
3+
import { SchemaContext } from 'graphiql';
4+
5+
import { DocExplorer } from './DocExplorer';
6+
7+
/**
8+
* Context Conusmer for rendering DocExplorer in GraphiQL.
9+
*/
10+
export default function DocExplorerGraphiQL() {
11+
return (
12+
<SchemaContext.Consumer>
13+
{({ schema }) => <DocExplorer schema={schema} />}
14+
</SchemaContext.Consumer>
15+
);
16+
}

0 commit comments

Comments
 (0)