Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error reading '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' #3864

Open
monscamus opened this issue Feb 6, 2025 · 1 comment

Comments

@monscamus
Copy link

monscamus commented Feb 6, 2025

When I run the latest Graphiql component in my React test project I get the following error.

Uncaught TypeError: Cannot read properties of undefined (reading '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED')

Image

The key code I use is (for AWS):

  return isAuthenticated ? (
    <Suspense fallback=''>
      <GraphiQL fetcher={async (graphQLParams) => {
        const tokens = await (await fetchAuthSession()).tokens;
        let tok: string = tokens?.idToken === undefined ? '' : tokens.idToken?.toString();

        const data = await fetch(newFunction(), {
          method: "POST",
          headers: {
            Accept: "application/json",
            "Content-Type": "application/json",
            Authorization: tok,
          },
          body: JSON.stringify(graphQLParams),
          credentials: "same-origin",
        });
        return data.json().catch(() => data.text());

        function newFunction(): RequestInfo {
          return import.meta.env.VITE_GRAPHQL_ENDPOINT;
        }
      }} />;

Thought you guys should know (hope nobody gets fired).

@littletuna4
Copy link

Seems to be something to do with headlessui/react version - have you worked this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants