[Feature request] Support injection/highlighting in gatsby's "graphql(`...`)"
See original GitHub issueThanks for an incredibly useful plugin!
Gatby has an unusual way of calling graphql in it’s Node Apis.
const result = await graphql(`
query {
allMarkdownRemark {
edges {
node {
fields {
slug
}
}
}
}
}
`)
In this case graphql
is not a tag, but a function that returns a Promise. It would be nice if this plugin was able to recognize queries inside of it. You can see an official example here https://www.gatsbyjs.org/docs/node-apis/#createPages
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:6
Top Results From Across the Web
[Feature request] Support injection/highlighting in gatsby's ...
I believe syntax highlight detection is different per framework. Example. Gatsby - graphql(; Apollo - gql(; My project - dispatch("graphql/query ...
Read more >GraphQL Query Options - Gatsby
This page will walk you through a series of GraphQL queries, each designed to demonstrate a particular feature of GraphQL. These examples will...
Read more >ADDING FEATURES TO YOUR GATSBY SITE - This Dot Labs
Enter $ gatsby develop on the terminal (make sure you are in the project directory) which will enable Gatsby spin up a local...
Read more >Featured Plugin: JS GraphQL | The WebStorm Blog
The plugin brings full support for the GraphQL Schema Definition Language (SDL). That means your .graphql file will include syntax highlighting, ...
Read more >GraphQL - Diving Deep – The Guild
This will help us to make the end-end request-response lifecycle ... of this would be Gatsby where irrespective of the source of data, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi le0nik.
Thanks for using the plugin.
I’ll label this as an enhancement.
For now you can manually trigger GraphQL language injection by adding a
//language=GraphQL
comment on the line above thegraphql
function, e.g.:Best regards, Jim.
Please add support for
/* GraphQL */
, this is very much needed