gajus / babel-plugin-graphql-tag

Compiles GraphQL tagged template strings using graphql-tag.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible with apollo-link-logger

leethree opened this issue · 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