To enable syntax highlight in graphql query/mutation definition in IntelliJ IDE’s follow few steps.
Initially gql query is displayed as regular string.
In editor preferences > plugins > marketplace find JS GraphQL plugin
Then you need to configure .graphqlconfig by selecting: new > GraphQL Configuration File in project root file schemaPath property should point to schema.graphql file in your project
If you configure the application correctly you should see the schema discovered and “No errors found”
Now you should see syntax highlight, suggestions and validation based on graphql schema.
If you have problems with the setup checkout the plugin documentationTweet