Skip to content

Syntax highlighting fails when seeing .graphql` #135

@ericclemmons

Description

@ericclemmons
const query = require('fs').readFileSync(`${__dirname}/MyQuery.graphql`, 'utf8');

describe('some test' () => {
  it('should do something', async () => {
    return request
      .post('/graphql')
      .send({ query, variables })
      .expect(res => expect(res.body).toMatchSnapshot())
      .expect(206);
  });
});

//   Some
//   comments

I was able to confirm that the following works:

const query = require('fs').readFileSync(__dirname + '/MyQuery.graphql', 'utf8');

So the issue is with graphql + backtick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions