-
Notifications
You must be signed in to change notification settings - Fork 70
graphql: Unexpected invocation at runtime #40
Comments
I would suspect that the babel plugin is not doing its work, possibly the artifact dir doesn’t match during webpack resolving 🤔 Can you see if things work correct without using the |
Just to be sure, did this work with Relay 1.5 without the language plugin support? |
Oh wait, I remember now having dealt with something similar in the past. Assuming you did not previously have this setup working without language plugin support, I think the issue is that |
Thanks for the ideas. Losing the
I cross-checked the tsconfig from the example app and this is the example app version with some modifications that produces the same error for me: {
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"lib": ["dom", "es2015"],
"sourceMap": true,
"jsx": "react",
"esModuleInterop": true,
"outDir": "dist",
"allowSyntheticDefaultImports": true
},
"types": [
"webpack-env",
"node"
],
"strict": true,
"include": [
"src/**/*"
],
"exclude": [
"node_modules"
],
"files": [
"typings/Core.d.ts"
]
} However, I was using
And indeed, when I look at the unsourcemapped code in my browser, I see:
Could Thanks a lot! |
Yeah the TS module config needs to be set to As for the PS: @kastermester has started on a tsc plugin as an alternative to the babel plugin, but it has not been finished/released yet afaik. |
I added some documentation about this to the README bdbc0e2, let me know if you have any further thoughts/questions on this topic. |
Great, thanks! Using es2015 and Thanks for your help! |
Good point, done 👍 |
Hi,
I cannot seem to get the Babel transform running on my generated typescript code. Perhaps you can shed some light on what I am doing wrong. Both relay-compiler and webpack-dev-server start up fine without any errors, generated
.graphql.ts
files show up in my artifact directory, but in browser console I getUsing
v1.5.0-plugin.5
fromalloy/relay
. I run webpack withwebpack-dev-server
, this is how I run my compiler:This is my
.babelrc
I have this in my webpack config:
Relevant packages:
Any help would be greatly appreciated. Thanks!
The text was updated successfully, but these errors were encountered: