graphql-kit / graphql-voyager

🛰️ Represent any GraphQL API as an interactive graph
https://graphql-kit.com/graphql-voyager/
MIT License
7.79k stars 517 forks source link

Graph view not rendering #29

Closed theogravity closed 7 years ago

theogravity commented 7 years ago

When I hit the graphql voyager endpoint, the sidebar loads properly, but the main view gets stuck on "Transmitting..."

image

In the JS console, I get blob:http://localhost:4000/427b21a8-5a9a-4f6f-8baf-463f5d906201:12 Uncaught SyntaxError: Illegal return statement

Which is buried in the bundle (under // ENSCRIPTEN_END_FUNCS)

;return{_i64Subtract:t6,_memset:u6,_bitshift64Lshr:z6,_bitshift64Shl:v6,_fflush:m4,_bitshift64Ashr:y6,_vizLastErrorMessage:Gb,_sbrk:H6,_memcpy:B6,_llvm_bswap_i32:K6,___muldi3:G6,___uremdi3:J6,_testSetjmp:A6,_llvm_cttz_i32:C6,_vizCreateFile:Hb,___udivmoddi4:D6,_realloc:n6,_i64Add:w6,_llvm_bswap_i16:L6,_emscripten_get_global_libc:G1,_htons:L4,___udivdi3:E6,___errno_location:L1,___muldsi3:F6,_vizRenderFromString:Ib,_saveSetjmp:x6,_free:l6,_dtextract:Pz,_memmove:I6,_malloc:k6,_memalign:q6,runPostSets:s6,stackAlloc:yb,stackSave:zb,stackRestore:Ab,establishStackSpace:Bb,setTempRet0:Db,getTempRet0:Eb,setThrew:Cb,stackAlloc:yb,stackSave:zb,stackRestore:Ab,establishStackSpace:Bb,setThrew:Cb,setTempRet0:Db,getTempRet0:Eb,dynCall_vi:M6,dynCall_iiii:N6,dynCall_viiiii:O6,dynCall_d:P6,dynCall_di:Q6,dynCall_i:R6,dynCall_iiiiiiiiiii:S6,dynCall_iiidd:T6,dynCall_vii:U6,dynCall_iiiiiii:V6,dynCall_viiiddi:W6,dynCall_viiiiiiiii:X6,dynCall_ii:Y6,dynCall_dddd:Z6,dynCall_viii:_6,dynCall_v:$6,dynCall_iiiii:a7,dynCall_viiiiii:b7,dynCall_iii:c7,dynCall_iiiiii:d7,dynCall_viiii:e7}})

Unsure if this matters, but the generated bundle reads rc-4 instead of 5.

/*!
 * GraphQL Voyager - Represent any GraphQL API as an interactive graph
 * -------------------------------------------------------------
 *   Version: "1.0.0-rc.4"
 *   Repo: https://github.com/APIs-guru/graphql-voyager
 */
IvanGoncharov commented 7 years ago

@theogravity Can you reproduce it on the online demo(use Custom Schema option)? Can you please attach result of introspection query for your API?

Unsure if this matters, but the generated bundle reads rc-4 instead of 5.

I will check but the only difference between rc4 and rc5 is a presence of middleware.

steplov commented 7 years ago

Hello, i can confirm the bug. It happens only with rc.5 version.

I will check but the only difference between rc4 and rc5 is a presence of middleware.

I don't agree. in this commit https://github.com/APIs-guru/graphql-voyager/commit/96009e8d95fdaa270c8a658693504838a981071c if you check yarn.lock file you will find that some dependencies were updated, one of them cause this bug

theogravity commented 7 years ago

I have no problems with the online demo.

I unfortunately can't paste my introspection as it would give away something we're working on at work that's secret right now.

IvanGoncharov commented 7 years ago

I don't agree. in this commit 96009e8 if you check yarn.lock file you will find that some dependencies were updated, one of them cause this bug

@steplov Make sense since I forget to update online demo and it still on rc.4. So it's probably yarn.lock related bug.

awdDev786 commented 7 years ago

can you resolve the issue?as i m also having the same issue +

   Error: Can't set headers after they are sent.

On node console.

RomanHotsiy commented 7 years ago

The issue was caused by upgrading viz.js to 1.8.0. Temporarily I downgraded it back to 1.7.1 and published a new version of voyager: 1.0.0-rc.7.

Thanks all for participation!

theogravity commented 7 years ago

Thanks, it works!

dflor003 commented 7 years ago

I'm still getting this in 1.0.0-rc.7:

image