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.

Seeking Codegen feedback

See original GitHub issue

I’d like to remove codegen completely in an upcoming major release of the CLI. For awhile, graphql-code-generator has been a superior tool which offers compatibility with all of Apollo’s tools. We highly recommend migrating to it.

For anyone who is still using Apollo’s codegen feature, is there anything in particular that’s prevented you from making the switch?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:7
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
markhalonencommented, May 25, 2022

can you share your use-case for accessing intermediate types?

For example I’d import a type such as

import {
PartNumberProcessQuery_partNumberById_processNodeByDefaultProcessNodeId_descendantRelationships_processNodeByFromId as ProcessNodeWithDetails,
} from '../generated'

and then parse a tree into an ordered flat list of these Nodes, and then pass that flat list to a child component.

ad-hoc lookup types should solve that for you

Ah, I looked that up. I’ve never used lookup types before. Wow, TypeScript is powerful! That would be a solution for intermediate types.

Well, especially with the Apollo maintainers advocating for graphql-code-generator it seems a migration is in my future… Thanks for the tips guys!

4reactions
trevor-scheercommented, May 20, 2022

@dotansimha thanks for that fantastic writeup, I’m sorry we never went forward with any of the suggestions you laid out. It certainly wasn’t for a lack of effort on your part - as I’m sure you can tell this repo has gone unloved for some time now. 2 years ago, the idea of wrapping graphql-code-generator might’ve been appealing, but at this point we’re actively trying to push users away from the CLI (in most cases, when possible, excluding a few client:* commands which aren’t yet supported by rover).

I’m going to leave #2053 open for now since there’s a lot of great information there for people looking to migrate, in hopes that it’s slightly more discoverable open instead of closed. You’re more than welcome to close it if you choose, I’ll probably close whenever I finally get to cut the last major for these packages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Asking For Reviews With One Simple Link - GatherUp
GatherUp offers many options for requesting new reviews, ... Taking the Feedback URL into a free code creator like QR Code Generator turns ......
Read more >
Bad codegen with operator new - Visual Studio Feedback
This code passes wrong value to operator new starting from VS2019 Update 7 (19.27+). void f() { const size_t s = 10e+9; new...
Read more >
Official - IL2CPP Build Time Improvements - Seeking Feedback
Hello Alpha Users! Multiple teams in Unity have been working on improving iteration time of player builds the past few releases.
Read more >
2020-2022 WPILib Feedback - Programming - Chief Delphi
In the same vein of the COTS review thread, the WPILib team is seeking feedback on the many improvements and changes made to...
Read more >
[llvm-dev] [IR] GlobalIFunc with declaration as resolver
Next message: [llvm-dev] status of CodeGen in new Pass Manager ... and I wanted to get wider feedback for the IR-level semantics.
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