-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
GRAPHIQL'S BUILD SCRIPT
Not sure but I think there might be something off with the build - while working on trying to submit a couple pr's within the project, the yarn build command kept logging errors...
YARN PNP
Not sure if this is related or just a pnp issue but I a yarn pnp project using graphiql I work on -
if I just do a basic setup it worked -
export function GraphiQLPage() {
return <GraphiQL fetcher={fetcher} />;
}
but if I do more complex setup it did not -
function InsideContext() {
return <GraphiQLInterface />;
}
export function GraphiQLPage() {
return (
<GraphiQLProvider
plugins={[HISTORY_PLUGIN, DOC_EXPLORER_PLUGIN]}
fetcher={fetcher}
>
<InsideContext />
</GraphiQLProvider>
);
}
I also couldn't get a custom worker setup so I ended up just switching to node modules to get everything working.
JEST
Not sure if this is related or not either, but a yarn project using graphiql I work on tests did not work well with jest and kept giving errors, I ended up getting it working like this, but not sure if there's something off with the build or if it's because of esm and jest not quite right yet
jest.unstable_mockModule(module, () => ({
__esModule: false,
...jest.requireActual('graphiql') as any
}));
Expected Behavior
No response
Steps To Reproduce
for build
run the yarn build script in the graphiql repo
in this codesandbox - run yarn, yarn build:client, yarn build:server
Environment
- GraphiQL Version:
- OS:
- Browser:
- Bundler:
reactVersion:graphqlVersion:
Anything else?
No response