New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"No Schema Available" #156
Comments
Aha! Digging a little further into the issues here to learn more about CraftQL, I learned that the devmode=true flag gives a little bit more info which led me to a temporary solution. So, I had a dropdown field that had numbers as values -- it seems this broke the schema analyzer "RatingEnum must be an array with values as keys". After replacing all of the values of my dropdown with strings (that did not start with a number) the schema was generated successfully! So, I guess a feature request here might be to support dropdowns with numbers as values? Not sure if that's feasible or not with the existing architecture? |
Oooo, interesting, yes this is one of the most fragile parts of the "Craft to GraphQL" conversion. Craft also allows empty drop-down values, which GraphQL chokes on too. In terms of a fix I'm inclined to say that CraftQL just won't support numeric drop-down values, not natively at least because GraphQL doesn't support it. The only other option I can think of is some sort of transformer that moves |
Unfortunately I don't have a great way to fix this so I added an explicit |
@markhuot Thanks for the quick action on this one! I think an explicit exception will help a lot. One suggestion I might add is to make note of the dev mode features somewhere in the README :) |
Set `throwSchemaBuildErrors` to `true` to get the old functionality of thrown exceptions.
Set `throwSchemaBuildErrors` to `true` to get the old functionality of thrown exceptions.
Hello @markhuot !
First, I want to say -- what an incredible plugin! I'm migrating an existing Craft 3 site built traditionally on Twig templates & PHP to a React SPA and this is a frickin' God-send. I can't express to you the gratitude I have for this plugin right now...
Only issue I'm currently experiencing is it seems my schema is broken. I'm getting the "No Schema Available" message when I open up the Docs in Graphiql (JS GraphQL plugin for WebStorm is also picking up nothing).
I'm able to query just fine, even some slightly involved queries with relatedTos and subqueries for things like asset lists. I'm also getting a complete list of sections in the Token Scopes settings.
Any ideas what might be causing this and/or how to fix it?
The text was updated successfully, but these errors were encountered: