typescript-operations, I want to use query result interface #4990
-
I want to use code in other script file, so I try to export that blue-roomed part. I try to find plugin config option which can export that blue part separately, but I cannot find. Crying and eating mustard, I import this by Is there any way to import/export that blue part directly from generated file? thanks in advance! Below is my codegen.yml
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @SmileJayden , We had long discussion here about the differences. In the end, it's a matter of preference and what you are used to. I can only recommend the following:
It will eliminate the amount of aliasing you have to do, and put them all in one place.
Also related: |
Beta Was this translation helpful? Give feedback.
Hi @SmileJayden ,
We had long discussion here about the differences. In the end, it's a matter of preference and what you are used to.
I can only recommend the following:
Use more fragments. Fragments makes it easier to understand what fields you actually need per each type in your schema, and the codegen generates types for fragments, so it makes it easier to reuse. It's also easier to pass fragment type to component props.
Create a file that does the following:
It will eliminate the amount of aliasing you have to do, and put them all in one place.
typescript-co…