Skip to content

Commit

Permalink
changeset tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Nov 1, 2023
1 parent cebe15a commit ea19c44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .changeset/stale-gifts-promise.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@graphiql/react': patch
---

Fix initialState for new hooks
Remove initialState for new hooks, add `additionalComponent` to toolbar to allow buttons to use context
3 changes: 1 addition & 2 deletions packages/graphiql-react/src/utility/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export function createContextHook<T>(context: Context<T | null>) {
if (value === null && options?.nonNull) {
throw new Error(
`Tried to use \`${
// options.caller?.name || useGivenContext.caller.name
''
options.caller?.name || useGivenContext.caller.name
}\` without the necessary context. Make sure to render the \`${
context.displayName
}Provider\` component higher up the tree.`,
Expand Down

0 comments on commit ea19c44

Please sign in to comment.