This code:
import gql from 'graphql-tag'
const query = gql`
query ViewerQuery() {
viewer() {
id
displayName
username
}
}
`
Throws the error Uncaught ReferenceError: gql is not defined. Which is a little baffling because it's clearly imported two lines above, the same way it is in other files:

When I fix the syntax of the query by removing the parentheses, everything works as expected.
query ViewerQuery {
viewer {
....
Version: 2.6.1
having empty parentheses there is invalid GraphQL syntax and _might_ be why the import isn't working, but i think there might be a couple of issues here. closing for now — please re-open if you think that there's something wrong with this library.
@jnwng the same problem...
@jnwng I wasn't very clear in my initial post - The issue as I see it is that the error is confusing & misleading. Throwing some kind of "Error: Invalid GraphQL syntax" would be helpful.
Most helpful comment
@jnwng I wasn't very clear in my initial post - The issue as I see it is that the error is confusing & misleading. Throwing some kind of "Error: Invalid GraphQL syntax" would be helpful.