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

Postgraphile Sandbox/Playground #273

Open
3 of 6 tasks
rattrayalex opened this issue Apr 20, 2021 · 2 comments
Open
3 of 6 tasks

Postgraphile Sandbox/Playground #273

rattrayalex opened this issue Apr 20, 2021 · 2 comments

Comments

@rattrayalex
Copy link
Contributor

Feature description

Make a new repo with a Deploy to Heroku button for easily playing around with postgraphile without having to install anything or do toilsome setup.

It should come with postgres, pgadmin and postgraphile installed and running within a docker container, probably with one or more example databases installed.

It should be running with a variety of recommended plugins and settings for development, like --enhance-graphiql and --allow-explain.

By default, it should run the CLI, but it should also have a JS-driven example included with a easy switch to use that, so you can fork, write a custom plugin, and deploy with a click.

(Note that it should not use heroku's built-in postgres because it doesn't allow CREATE ROLE and could get expensive if a malicious actor spotted a free, world-configurable database).

Inspired by this discussion

Motivating example

  1. Have one official playground running that prospective users can play with, to see what postgraphile is like in the wild. (This should probably be completely cleared and rebooted at regular intervals, perhaps with a bit of automation from the heroku api and a stable subdomain).
  2. Allow postgraphile users to quickly spin up their own playgrounds to explore prototyping concepts.
  3. Allow postgraphile users to to demonstrate a minimal repro case for a bug or issue by running DDL, inserting data, and running a gql query.

Breaking changes

None

Supporting development

I intend to build this myself over the next week or two, but who knows life happens sometimes, so I wanted to file as an issue in case I don't get to it and someone else wants to come along and build it.

I [tick all that apply]:

  • am interested in building this feature myself
  • am interested in collaborating on building this feature
  • am willing to help testing this feature before it's released
  • am willing to write a test-driven test suite for this feature (before it exists)
  • am a Graphile sponsor ❤️
  • have an active support or consultancy contract with Graphile
@benjie benjie transferred this issue from graphile/graphile-engine Apr 21, 2021
@benjie
Copy link
Member

benjie commented Apr 21, 2021

I’d love this to use library mode and support a few different configs via separate endpoints, e.g. /simple/graphql (builtins + simplify inflector) /kitchen-sink/graphql (filters, aggregates, etc) etc. Check out these alternatives for example:

https://github.com/graphile/postgraphile/tree/main/examples/servers/express

TBH if you sort out the infra and build just these two I should be able to very rapidly add any others that seem valuable 👍

@rattrayalex
Copy link
Contributor Author

Nice, I like that idea! Should be pretty doable too.

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

No branches or pull requests

2 participants