babel-plugin-graphql-tag
babel-plugin-graphql-tag copied to clipboard
Incompatible with @apollo/client 3.3.19?
Apollo client changed the way graphql-tag
is exported, it causes runtime error after babel transform:
My versions:
"@apollo/client": "3.3.19",
"@babel/core": "7.14.3",
"babel-plugin-graphql-tag": "3.3.0",
"graphql-tag": "2.12.3",
Babel config:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
['graphql-tag', { importSources: ['graphql-tag'] }],
],
};
It works fine when I reverted @apollo/client
try "@apollo/client": "3.3.16"
older version works. but we need to update Apollo version. so this still needs to be fixed.
I was able to workaround this on 3.5.x by setting this plugin to only modify imports of @apollo/client
['graphql-tag', { importSources: ['@apollo/client'] }]