Closed lifeiscontent closed 6 years ago
Does this comment help? https://github.com/postgraphql/postgraphql/pull/506#issuecomment-315529696
Help writing docs to illustrate working examples would be welcome!
@benjie Yep, very helpful, if I wanted to pass a list of plugins from that plugins.js file, how would I do that within the CLI?
I wrote some docs on this yesterday as it happens: https://www.graphile.org/postgraphile/extending/#loading-additional-plugins
(Comma separated list; there's no shortcut for pulling multiple out of the same file currently... perhaps we should add ;
for that? `--append-plugins graphile-build-pg:PgTypesPlugin;PgIntrospectionPlugin;PgWhateverElsePlugin,./myplugins.js:Plugin1;Plugin2;Plugin3?)
I'm personally opting for the use-as-library option. Passing paths as arguments isn't that bad, but it might be nicer to use a config file at that point. I could see a lot of plugins getting used.
As an interesting aside, there's a project right now that seems to offer a json/yml alternative, with some degree of type safety. See: https://github.com/graphcool/gcl
I'm going to be working on a Relay Modern boilerplate that uses PostgraphQL and Docker Compose. Anyone interested in helping with this? I have a chunk of proprietary code I want to turn into a re-usable open-source template.
@chadfurman send me a link, I'd love to take a look.
I'm definitely keen to see that example! đź‘Ť
Very good, let me scrub any proprietary mentions and custom / non-applicable code. I'm about 2 weeks behind on my current schedule; however, I would like to get the ball rolling on some form of boilerplate.
I'll add this to my task list and try to slip something together asap. I'll need to find a few 2-hour blocks over the next week or so to make this real.
Make it a repository unto itself and ensure it uses a lockfile (preferably yarn.lock
); would be great to link out to it from the docs/etc đź‘Ť
@benjie I was planning on making a repo for it and calling it the Relay-Postgrres-Graphile boilerplate ^_^
+2 to repo creation
Confirmed that I will be working on this over the weekend. Will have something posted here asap
@benjie It doesn't run yet, but here is code: https://github.com/chadfurman/rpg-boilerplate
I'll work on it more tomorrow when I wake up and turn it into a running thing.
Note you'll need docker, sqitch, and will want to change the env vars. You'll also have to npm install
in both of the api
and frontend
folders.
I'll try to add a readme also that talks about directory structure and more.
@lifeiscontent check it out, let me know. Again, I'll be cleaning it up tomorrow. This is just a rough skeleton I pulled out of my code base.
I added you both as collaborators, so feel free to take a whack at it if you'd like.
@benjie @lifeiscontent I've fixed all the bugs and added some initial documentation. Please let me know what you think.
Have had a quick look through on my phone and it all looks good. A few comments:
Great work; thanks for doing this đź‘Ť
@benjie I'll address all of this feedback today. Thanks!
@benjie changes made. One thought is that there's a lot of content and discussion in the old postgraphql repo that we need to make sure we don't lose. Also, all new devs using postgraphql should be informed as soon and as often as possible that postgraphile is the new version.
This could possibly be done with a deprecation notice once postgraphile is stable. It could / should also be done on the readme here: https://github.com/postgraphql/postgraphql/
Yeah, once PostGraphile is in beta I'll be making that change. I've already started editing the README. I also added a banner to the header on the graphile.org site once you're inside the PostGraphile documentation. I'm also making an effort to publish both modules at the same time. Basically... I'm on it. But my main priority is to get v4 out of alpha and into beta - once that's done I'm probably going to merge it into a next
branch on GitHub and make that the primary README for the postgraphql repo.
[semi-automated message] Hi, there has been no activity in this issue for over 8 weeks so I'm closing it to keep the issues/pull request manageable. If this is still an issue, please re-open with a comment explaining why.
Hey @benjie I'm wondering how to use graphile-build / postgraphql together. I'm planing on wrapping postgraphql in a node app, and writing some custom plugins for the validation we talked about over google hangouts but unsure how to tie it all together.
are there any docs currently that illustrate working examples?