Comments (23)
Confirmed that I will be working on this over the weekend. Will have something posted here asap
from graphile-engine.
@benjie I'll address all of this feedback today. Thanks!
from graphile-engine.
I wrote some docs on this yesterday as it happens: https://www.graphile.org/postgraphile/extending/#loading-additional-plugins
from graphile-engine.
+2 to repo creation
from graphile-engine.
Does this comment help? graphile/crystal#506 (comment)
Help writing docs to illustrate working examples would be welcome!
from graphile-engine.
@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.
(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.
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.
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.
@chadfurman send me a link, I'd love to take a look.
from graphile-engine.
I'm definitely keen to see that example! 👍
from graphile-engine.
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.
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.
@benjie I was planning on making a repo for it and calling it the Relay-Postgrres-Graphile boilerplate ^_^
from graphile-engine.
@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.
@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.
I added you both as collaborators, so feel free to take a whack at it if you'd like.
from graphile-engine.
@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.
@benjie @lifeiscontent I've fixed all the bugs and added some initial documentation. Please let me know what you think.
from graphile-engine.
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.
@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.
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.
[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)
- Use collation in order by HOT 3
- GraphQL v16 HOT 6
- For some database schemas, PgIntrospectionPlugin.js abruptly crashes NodeJS (with --track-heap-objects flag, or memory profiling) HOT 5
- InitObject is typed wrong HOT 4
- [graphql-parse-resolve-info] Fix types or example HOT 3
- Custom functions for `nodeId` in `NodePlugin` HOT 2
- Add depth traversal to `simplifyParsedResolveInfoFragmentWithType` HOT 2
- No Way to Access Request From Resolvers? HOT 1
- [graphile-build]: Types for Build Don't Match Source HOT 4
- graphql-parse-resolve-info scalar fields HOT 2
- Pagination cursors not working for tables with at least one bigint component HOT 6
- Modify column SQL select HOT 1
- graphile/subscriptions-lds does not trigger on DELETE if subscription contains only edges
- Project depends on vulnerable version of jsonwebtoken HOT 2
- graphql-parse-resolve-info - What to do to get the same output like graphql-fields? HOT 5
- Don't silently swallow exceptions in resolveNode HOT 2
- alias a column at mutation time only? HOT 2
- Type with array property triggers error HOT 10
- Error using PG client: "We only support PG clients from a PG pool..." HOT 4
- pg-pubsub call to removeListener looks like it will not work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphile-engine.