feat!: msw/graphql, graphql as an optional peer dependency#2691
feat!: msw/graphql, graphql as an optional peer dependency#2691kettanaito wants to merge 14 commits into
msw/graphql, graphql as an optional peer dependency#2691Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@Andarist, hi 👋 Mentioning you just in case so this wouldn't conflict with the work you're doing. TL;DR |
|
This is not a new feature for the end user, but a change to the auxiliary tools (dependencies etc) right? According to conventional commits this would be the |
|
@THETCR, this changes how you import GraphQL handlers in a breaking way. This is entirely user-facing: -import { graphql } from 'msw'
+import { graphql } from 'msw/graphql'As such, this will be released as a breaking change. There's no way of achieving a lean module graph without taking most of the things out of the root export. |
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
commit: |
Motivation
mswleaks thegraphqlnamespace through the root entrypoints, which makesgraphqlimport problematic for developers who aren't even using GraphQL. This negatively impacts the bundle footprint as well.This is a change in a set of changes aimed to improve DX and bundle size of
mswacross the board.graphqlnamespace and any related values/types are no longer exported frommsw. Please use a designatedmsw/graphqlexport path to work with GraphQL requests.msw/core/graphqlexport path has been changed tomsw/graphqlfor brevity.Todos
feat/3.0. This is not meant to be released separately.defineNetwork) #2650 to benefit fromsetupWorker/setupServeracceptingAnyHandlerand notRequestHandler, which is incompatible withGraphQLHandler