-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
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')
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).
chemalopezplittletuna4
Metadata
Metadata
Assignees
Labels
No labels