diff --git a/.changeset/four-dogs-swim.md b/.changeset/four-dogs-swim.md new file mode 100644 index 00000000000..dc5e5a7015b --- /dev/null +++ b/.changeset/four-dogs-swim.md @@ -0,0 +1,5 @@ +--- +'@graphiql/react': minor +--- + +Fix: removed deprecated usage of Fn.prototype.caller diff --git a/packages/graphiql-react/src/utility/context.ts b/packages/graphiql-react/src/utility/context.ts index baafed0539c..e6a4d314ead 100644 --- a/packages/graphiql-react/src/utility/context.ts +++ b/packages/graphiql-react/src/utility/context.ts @@ -21,7 +21,7 @@ export function createContextHook(context: Context) { if (value === null && options?.nonNull) { throw new Error( `Tried to use \`${ - options.caller?.name || useGivenContext.caller.name + options.caller?.name || 'a component' }\` without the necessary context. Make sure to render the \`${ context.displayName }Provider\` component higher up the tree.`,