babel-plugin-graphql-tag icon indicating copy to clipboard operation
babel-plugin-graphql-tag copied to clipboard

Incompatible with apollo-link-logger

Open leethree opened this issue 3 years ago • 0 comments

I'm using both babel-plugin-graphql-tag and apollo-link-logger but found that it will compile into broken code. The transformer will remove the following require statement inside apollo-link-logger incorrectly.

var _client = require('@apollo/client');

var loggerLink = new _client.ApolloLink(function (operation, forward) {
...
});

This will cause:

ReferenceError: _client is not defined

leethree avatar Nov 17 '20 17:11 leethree