JS GraphQL plugin syntax highlight not working with custom tag functions Follow
It works fine with "graphql-tag", but in my case there is a wrapper around it and syntax highlight doesn't work. Is there a way to make JS GraphQL work with custom tag functions?
Please sign in to leave a comment.
You can inject GraphQl manually in it using comment:
Or, inject it via Alt+Enter, Inject language or Reference:
Thanks, didn't know about both of those tricks. While this is a solution, it doesn't feel right to add comments or inject syntax every time, I have around hundred of gql operations in my average-size project, I can only image how many operations are there in large applications.
I wish there was an option in the plugin to specify packages/utilities as graphql tag functions for the syntax highlight to apply.
Plesse feel free to file a feature request to https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/
The graphql plugin use to work exactly at describe above, that is, gql`query...` so the answer above is incorrect. It now seem broken and useless in the recent release!