Skip to content

Parcel 2 nightly failure: ApolloClient Invariant violation #4737

Answered by DeMoorJasper
water-a asked this question in General
Discussion options

You must be logged in to vote

This is not a bug it's intended behaviour and was a breaking change in the graphql transformer.

This decision was mainly due to it pretty much only being used in apollo and creating larger bundles and non usable assets for anyone who wanted to use a smaller or faster graphql library or even write their own.

Also it saves some bytes in the final bundle size and should also make code parsing slightly faster as there is less code to parse. Execution might be slightly slower although I doubt you would really notice as graphql-tag is a pretty small library.

You can just run our result in graphql-tag and it'll work...

Example:

// Returns processed graphql query string
import TestQuery from "./t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DeMoorJasper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4737 on June 15, 2020 07:06.