Skip to content

Commit 8468a3b

Browse files
committed
changeset tweak
1 parent 588fbce commit 8468a3b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.changeset/stale-gifts-promise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
'@graphiql/react': patch
33
---
44

5-
Fix initialState for new hooks
5+
Remove initialState for new hooks, add `additionalComponent` to toolbar to allow buttons to use context

packages/graphiql-react/src/utility/context.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export function createContextHook<T>(context: Context<T | null>) {
2121
if (value === null && options?.nonNull) {
2222
throw new Error(
2323
`Tried to use \`${
24-
// options.caller?.name || useGivenContext.caller.name
25-
''
24+
options.caller?.name || useGivenContext.caller.name
2625
}\` without the necessary context. Make sure to render the \`${
2726
context.displayName
2827
}Provider\` component higher up the tree.`,

0 commit comments

Comments
 (0)