Support for graphql string literal
See original GitHub issueI want to be able to use the use gql tag template literal with fragment embedding as I find that format to be easier to read and write. I am not sure how separate .graphql
files are technically different to string literal format. Is it that it adds a package to parse the query to AST at runtime? If that is true then can we integrate a static compiler that does that for me during build-time?
https://github.com/firede/ts-transform-graphql-tag
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
How do I represent a string enum (string literal union) in ...
I have a short list of string literals which I would like to have represented in my GraphQl definition. I tried using enum,...
Read more >Support for string literal comments · Issue #21 - GitHub
The gql tagged template literal is available as an export in just about every top-level apollo package, so it's pretty widely used.
Read more >Schemas and Types - GraphQL
String is one of the built-in scalar types - these are types that resolve to a single scalar object, and can't have sub-selections...
Read more >GraphQL schema basics - Apollo GraphQL Docs
GraphQL's schema definition language (SDL) supports Markdown-enabled documentation strings, called descriptions. These help consumers of your graph discover ...
Read more >Why do GQL strings need to be put through the gql function in ...
A place for interesting and informative GraphQL content and ... Because it's not valid JavaScript it goes into a string literal.
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
Will do sir. Gonna use it in a new project I am heading. Thanks for your work.
I pushed graphql-let@canary, containing Babel Plugin support allowing you to get typed graphql-codegen results from inline GraphQL documents. Please drop a comment before merging it if you notice something.
https://github.com/piglovesyou/graphql-let/tree/pr-gql-tag#experimental-feature-babel-plugin-for-inline-graphql-documents