-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Craft Gql deserves to have it's own default routing signature #4975
Comments
p.s. the second issue cross-linked is worth reading as the most indicative of how mysterious people find the result of this issue, and also points up something I've thought several times otherwise but forgot to put here initially. It's that the generic 'Cannot query xxx on type Query' message doesn't particularly help anyone, and that Gql can do better here, by adding the suggestion that "It's likely you're getting this message because the access token you're using doesn't allow permission for the element or field you're trying to fetch...fix via GraphQL>Tokens [etc.]". The original message I presume comes up from webonyx, but you can do as I do for a other confusing ones within a certain plugin, and string match on the return, to add your own amplification. I know you thought of that... |
Craft actually doesn’t assume an |
Yeah, I was just checking this out on a finally peaceful day, as I missed your note here, and see that:
So, I would conclude that the issue exists, but that it's a doc issue. It's going to cause problems, as you see from the support issues above. Propose: just make the doc suggest 'gql' for the route signature. Problem solved? |
Ha, you rude guy. Really made me laugh :) |
Description
Twice in the last week, people new to GraphQL on Craft have been bitten by the default
api
routing on Gql -- here are the cases: markhuot/craftql#319 (comment) and markhuot/craftql#322 (comment).Both CraftQL and Gql default to trying to use the route
api
as default, as why not..., and so also I believe would ElementAPI. The last one setting the route wins, and due to plugin initialzation positioning, that's Gql.Hence persons who install and set up CraftQL don't reach it, and get mystifying errors.
Suggestion is that Craft Gql would be well placed to own its own default routing, something indicative like simple
gql
, or whatever you please that communicates well, matched in documentation.The text was updated successfully, but these errors were encountered: