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.

Support use in graphql-let

See original GitHub issue

Would be nice if this could support graphql-let.

I’ve added the issue to both projects since at this point I don’t know which library should be the one to handle this.

Generates the following error:

Plugin "typed-document-node" validation failed:

 Found 1 error

  ✖  <redacted>/node_modules/graphql-let/__generated__/src/renderer/auth/graphql/documents.graphql.tsx
    Plugin "typed-document-node" requires extension to be ".ts"!
    Error: Plugin "typed-document-node" validation failed:
        at executePlugin (<redacted>/node_modules/@graphql-codegen/core/index.cjs.js:31:19)
    Error: Plugin "typed-document-node" validation failed:
        at executePlugin (<redacted>/node_modules/@graphql-codegen/core/index.cjs.js:31:19)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
dotansimhacommented, Jul 21, 2020

It makes sense. I need we need to investigate it a bit more. Also, I think graphql-let uses near-operation-file preset, and the plugin for typed-document-node haven’t been tested for it yet. I can add support for .tsx extensions, no problem 😉

1reaction
NickClarkcommented, Jul 22, 2020

So far so good.

I can confirm that commenting out the types in ApolloClient.d.ts fixes the issue mentioned above. Unfortunately, I haven’t been able to figure out how to ignore them or work around them.

Also, this issue seems related: https://github.com/microsoft/TypeScript/issues/36146

Read more comments on GitHub >

github_iconTop Results From Across the Web

piglovesyou/graphql-let: A webpack loader / babel-plugin ...
graphql -let generates types by default, where it uses the plugin. The plugins in .graphql-let.yml is for per-document, which imports the shared types ......
Read more >
graphql-let - A Webpack loader for GraphQL Code Generator
It lets you directly import GraphQL documents and use GraphQL Code ... It's still partial support, but graphql-let provides a babel plugin ...
Read more >
graphql-let - npm
Start using graphql-let in your project by running `npm i graphql-let`. There is 1 other project in the npm registry using graphql-let.
Read more >
Let GraphQL Code Generators do the boring stuff - Egghead.io
This talk will show you how you can let GraphQL code generators do the boring stuff. ... Here are all my personals and...
Read more >
Compiling queries with Babel - Apollo GraphQL Docs
All of these approaches support the use of fragments. ... With babel-plugin-import-graphql , you can just include your fragment in your GraphQL file...
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