Giter Club home page Giter Club logo

Comments (23)

chadfurman avatar chadfurman commented on August 18, 2024 2

Confirmed that I will be working on this over the weekend. Will have something posted here asap

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024 2

@benjie I'll address all of this feedback today. Thanks!

from graphile-engine.

benjie avatar benjie commented on August 18, 2024 1

I wrote some docs on this yesterday as it happens: https://www.graphile.org/postgraphile/extending/#loading-additional-plugins

from graphile-engine.

benjie avatar benjie commented on August 18, 2024 1

+2 to repo creation

from graphile-engine.

benjie avatar benjie commented on August 18, 2024

Does this comment help? graphile/crystal#506 (comment)

Help writing docs to illustrate working examples would be welcome!

from graphile-engine.

lifeiscontent avatar lifeiscontent commented on August 18, 2024

@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?

from graphile-engine.

benjie avatar benjie commented on August 18, 2024

(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?)

from graphile-engine.

newswim avatar newswim commented on August 18, 2024

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

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

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.

from graphile-engine.

lifeiscontent avatar lifeiscontent commented on August 18, 2024

@chadfurman send me a link, I'd love to take a look.

from graphile-engine.

benjie avatar benjie commented on August 18, 2024

I'm definitely keen to see that example! 👍

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

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.

from graphile-engine.

benjie avatar benjie commented on August 18, 2024

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 👍

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

@benjie I was planning on making a repo for it and calling it the Relay-Postgrres-Graphile boilerplate ^_^

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

@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.

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

@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.

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

I added you both as collaborators, so feel free to take a whack at it if you'd like.

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

@benjie I tossed this in there also: https://github.com/chadfurman/rpg-boilerplate/blob/master/api/src/plugins/PluginName.js

https://github.com/chadfurman/rpg-boilerplate/blob/master/api/src/index.js#L3

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

@benjie @lifeiscontent I've fixed all the bugs and added some initial documentation. Please let me know what you think.

from graphile-engine.

benjie avatar benjie commented on August 18, 2024

Have had a quick look through on my phone and it all looks good. A few comments:

  • as it’s a boilerplate it should use best practices, but a number of files containing credentials are stored under version control (both config files and SSL certificates). Should probably rename these files so they end “.example” and instruct the user to fix them.
  • the repo is monorepo-like; I’d advise considering yarn 1.0.2+ and yarn workspaces for this.
  • it’s probably a good idea to use “postgraphile” rather than “postgraph” in variables/comments to avoid confusion.
  • if the migrations had a numeric prefix it’d be easier to see what order they would run rather than having to cross-reference the plan.

Great work; thanks for doing this 👍

from graphile-engine.

chadfurman avatar chadfurman commented on August 18, 2024

@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/

from graphile-engine.

benjie avatar benjie commented on August 18, 2024

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.

from graphile-engine.

benjie avatar benjie commented on August 18, 2024

[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.

from graphile-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.