File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
graphiql-plugin-doc-explorer/src
graphiql-react/src/components Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @graphiql/plugin-doc-explorer ' : patch
3
+ ---
4
+
5
+ push field type on stack too before field
Original file line number Diff line number Diff line change @@ -132,6 +132,13 @@ export const docExplorerStore = createStore<DocExplorerStoreType>(
132
132
break ;
133
133
}
134
134
case 'Field' : {
135
+ // Show a field type on stack
136
+ if ( ref . type ) {
137
+ push ( {
138
+ name : ref . type . name ,
139
+ def : ref . type ,
140
+ } ) ;
141
+ }
135
142
push ( {
136
143
name : ref . field . name ,
137
144
def : ref . field ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ type GraphiQLProviderProps =
50
50
51
51
type GraphiQLStore = UseBoundStore < StoreApi < AllSlices > > ;
52
52
53
- const GraphiQLContext = createContext < RefObject < GraphiQLStore > > ( null ! ) ;
53
+ const GraphiQLContext = createContext < RefObject < GraphiQLStore > | null > ( null ) ;
54
54
55
55
export const GraphiQLProvider : FC < GraphiQLProviderProps > = ( {
56
56
storage,
@@ -317,7 +317,6 @@ const SynchronizeValue: FC<SynchronizeValueProps> = ({
317
317
318
318
export function useGraphiQL < T > ( selector : ( state : AllSlices ) => T ) : T {
319
319
const store = useContext ( GraphiQLContext ) ;
320
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- fixme
321
320
if ( ! store ) {
322
321
throw new Error ( 'Missing `GraphiQLContext.Provider` in the tree' ) ;
323
322
}
You can’t perform that action at this time.
0 commit comments