Inside of a jsx file, I want to use a gql
template literal to define GraphQL queries.
Could I in emacs make that section of the jsx file highlight graphql syntax, instead of just showing it as a plain string?
Example:
import gql from 'graphql-tag'
const normalJavascriptCode = 42
const query = gql`
here(a: 1, b: 2) {
itWouldHighlightSyntax
accordingToGraphQLMode
}
`
const jsHighlightBackagain = () => {...}
Here you can see how it works for atom: https://github.com/apollographql/graphql-tools/issues/123#issuecomment-244830016