Skip to content

1.3.3 breaks queries with template literals #7

@dylang

Description

@dylang

Describe the bug

Seems like spaces are being added around template literal variables when they shouldn't be.

Input

graphql(
    > 82 |         gql`
         |             ^
      83 |             query getTable${isBug ? 'Bug' : ''}(

Output

GraphQLError: Syntax Error: Expected {, found Name "Bug"

Expected output
No bug.

Versions (please complete the following information):

  • Babel version: latest
  • GraphQL version: 14
  • Plugin version: 1.3.3

Additional context

Worked in 1.3.2 as long as there were no spaces. If there were spaces it broke. Can we support both cases?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions