How reflection works? Why serialization during reflection was removed in 0.21.1-next.2? #983
-
I asked question: This is connected with commit: @Weakky can you explain why you added these changes? I am interested in fixing this problem, but do not want to broke nothing from your code. Can I please for adding documentation of reflection in: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I modified code from my example to this:
It would be nice if handler on application start that is running single time would be added or documented. |
Beta Was this translation helpful? Give feedback.
-
Eager module code relying on side-effects is not supported by Nexus. See:
For a workaround for now wrap your code like this: // app.ts
if (!process.env.NEXUS_REFLECTION) {
yourHeavyAsyncCode()
} Reference graphql-nexus/nexus#732 (comment) |
Beta Was this translation helpful? Give feedback.
Eager module code relying on side-effects is not supported by Nexus.
See:
For a workaround for now wrap your code like this:
Reference graphql-nexus/nexus#732 (comment)