Add syntax highlighting to graphql-tools
See original GitHub issuePlease add support for highlighting for graphql-tools, or add a settings like EmbeddedQueryParser in .gqlconfig with startTag and endTag to enable highlighting.
The convention in graphql-tools is to declare types like this:
const typeDefs = `
interface Node {
id: Int!
}
`;
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Apollo extension for VS Code - Apollo GraphQL Docs
The extension enables you to: Add syntax highlighting for GraphQL files and gql templates inside JavaScript files; Get instant feedback and intelligent ...
Read more >GraphQL: Language Feature Support
Extension for Visual Studio Code - GraphQL LSP extension that adds ... syntax highlighting (type, query, mutation, interface, union, enum, ...
Read more >Install graphql-tag to Enable Syntax Highlighting ... - Egghead.io
In this lesson, we are going to install graphql-tag to enable syntax highlighting to our GraphQL query. graphql-tag parses your query and ...
Read more >There is a way to syntax highlight GraphQl TypeDef inside ...
Use String.raw to trick VSCode into Syntax Highlighting GraphQL. It works for other languages as well. export const gql = String.raw export ...
Read more >Online graphql code pretty printer / syntax highlighter - Reddit
paste raw graphql onto the left text area · copy formatted + colored graphql from the right · paste formatted + colored code...
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 Free
Top 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

Yes, that is one thing we might add (possibly). There is an open issue for apollo support in the gql library where you can give your inputs.
Ok, so let’s wait, Thank you for custom gql tag, this would actually work 😃
Btw, I guess this library won’t work for dynamic types right? Which you set programatically. If that is so, would you consider adding ability to introspect schema from a graphql server endpoint? In a similar fashion like in apollo-codegen, which can generates flow types from graphql endpoint.