question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add syntax highlighting to graphql-tools

See original GitHub issue

Please 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:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
kumarharshcommented, Nov 6, 2017

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.

0reactions
klis87commented, Nov 6, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found