Created
March 26, 2021 22:30
-
-
Save brendanmckenzie/a483b845836b0a8195d0139065985adc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const { postgraphile } = require("postgraphile"); | |
const PostGraphileNestedMutations = require("postgraphile-plugin-nested-mutations"); | |
const SimplifyInflectorPlugin = require("@graphile-contrib/pg-simplify-inflector"); | |
const app = express(); | |
app.use( | |
postgraphile(process.env.DATABASE_URL, "public", { | |
watchPg: true, | |
graphiql: true, | |
enhanceGraphiql: true, | |
appendPlugins: [PostGraphileNestedMutations, SimplifyInflectorPlugin], | |
}) | |
); | |
app.listen(3000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "pgpnm_29", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"@graphile-contrib/pg-simplify-inflector": "^6.1.0", | |
"express": "^4.17.1", | |
"postgraphile": "^4.11.0", | |
"postgraphile-plugin-nested-mutations": "^1.1.0" | |
}, | |
"scripts": { | |
"start": "node index.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment