rmosolgo / graphiql-rails

Mount the GraphiQL query editor in a Rails app
MIT License
447 stars 135 forks source link

Docs sidebar not working #18

Closed volkanunsal closed 7 months ago

volkanunsal commented 7 years ago

What is the purpose of the Docs sidebar in GraphiQL? It doesn't seem to do anything, only show a loading indicator when I click the button that opens it.

AndyKriger commented 7 years ago

When I look at the Docs pane, I see "No Schema Available" even though I'm running queries and mutations against a working schema that does have documentation strings.

volkanunsal commented 7 years ago

@AndyKriger I figured out the problem in my case. It turns out there were some validation errors in my schema. Specifically, I had used names with spaces in them for my fields. Once I fixed those issues, the sidebar started working.

AndyKriger commented 7 years ago

Hmm - that doesn't seem to be my problem. The schema works and I can query it.

rmosolgo commented 7 years ago

@AndyKriger Do you see any errors in your brower's JS console?

Besides that, check your browser's network console. Do you see any requests to your graphql endpoint? What responses do they get?

AndyKriger commented 7 years ago

very strange - i hadn't seen errors but it just started working suddenly - i didn't change anything in particular to make that happen but it works now - i'll keep an eye out if it stops working to see what might be going on

tanelj commented 7 years ago

I've got my sidebar work after I have comment out line mutation Types::MutationType (placeholder generated by graphql gem that was referring to blank MutationType (without any field)) line from GraphQL::Schema.define.

Winbobob commented 6 years ago

Maybe you could also check the Authorization field in your HTTP header. After I bypassed the check for the development environment, Documentation Explorer works for me.

richardadrian commented 3 years ago

In my case i had the max depth set too small, it prevented the schema from loading.

ViktorBurchenia commented 1 year ago

In my case i had the max depth set too small, it prevented the schema from loading.

It helps for me too. Thanks!

rmosolgo commented 7 months ago

Thanks everyone for sharing what you found here. Please open a new issue if you run into this trouble again!