netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.27k stars 2.59k forks source link

GraphiQL UI depends on external Javascript resources #17895

Closed GSeiNet closed 2 weeks ago

GSeiNet commented 2 weeks ago

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.1.5

Python Version

3.11

Steps to Reproduce

Click on GraphQL API Button New Window open with Loading then nothing happens no error

Expected Behavior

Wrong link is provided

Observed Behavior

nothing

arthanson commented 2 weeks ago

@GSeiNet works fine on my install (and on demo.netbox.dev). I'd suggest closing this and opening this as a discussion as it will get wider exposure and extra people to help debug what is going on. You can go to the graphiql window directly at /graphql/ URL, you might try that to see if it shows any extra debug info, maybe also check server logs?

jeremystretch commented 2 weeks ago

@GSeiNet is your NetBox instance isolated from the Internet? I noticed that the GraphiQL interface is pulling resources from unpkg.com, but it's meant to be fully self-contained. That might be the issue you're running into.

jeremystretch commented 2 weeks ago

I think 5c5a53b caused this issue: I removed the override of render_graphql_ide() to drop subscriptions_enabled without realizing this method is also used to override the template. (The custom template set on NetBoxGraphQLView has no effect and should be removed.)