Skip to content
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

Allow GraphQL in CP for non-admins #5813

Open
timkelty opened this issue Mar 19, 2020 · 1 comment
Open

Allow GraphQL in CP for non-admins #5813

timkelty opened this issue Mar 19, 2020 · 1 comment

Comments

@timkelty
Copy link
Contributor

@timkelty timkelty commented Mar 19, 2020

We have clients that would like to use the GraphiQL IDE in the CP to query elements, but currently it is limited to admins.

Would be great if this were a normal user permission.

@narration-sd

This comment has been minimized.

Copy link
Contributor

@narration-sd narration-sd commented Mar 20, 2020

@timkelty Tim, I wonder if it might not be a good thing to serve this need by bringing your clients the sponsored free Insomnia playground (https://insomnia.rest/)?

  • saves Andris one more task in the present
  • importantly, saves you and Andris from the inevitable creep of what they'd like.
    • If I can query, can't I download the data?
    • Isn't there JSON?
    • How do I pipe this to my reporting tool (it's almost always (or soon) about reporting)
    • etc., etc.
  • it's actually become quite a nice tool with the sponsorship (guy now works for sponsor)
  • it has the history, prettify, etc. and nicer automatic schemadoc that you're asking elsewhere for on CraftQL itself -- see above about Andris effort...
  • it has all these things mentioned - export the data, in json, etc. right on menus.

The further 'could you design a query for me?' you will have to choose how to handle...

The only task needed to set this up is to create a Schema with the appropriate access, and pass around the permission Token for it. Insomnia has a slot for this, so no need to instruct them how to make headers.

In fact you can do better than that. Insomnia has an Export feature that allows you to save complete Workspaces -- any number of queries, with all the urls, paths, tokens, and GraphQL itself already set up in them. You can just export and pass out the prepared setup.

Bingo, I think, and one more picture of what would really get asked for from Craft if they got into this area.

Other tools exist, of course. I think online ones like https://www.graphqlbin.com/ are out for data security, and I've used Insomnia a while over others, so on that at least can recommend it. I note there are now enterprisey features growing on it, but the free version is fully capable.

[we won't talk about the little expedition I took yesterday, thinking of what Andris would call 'over-engineered' plugins...which did give me these better thoughts in the morning]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.