Skip to content

Library usage now supported.

Compare
Choose a tag to compare
@calebmer calebmer released this 23 May 20:23
· 11290 commits to main since this release

Because PostGraphQL is written in Node.JS, it has the great advantage of being integratable with standing Node.JS applications. This release aims to make this goal even easier by enhancing PostGraphQL’s abilities as a library.

To use PostGraphQL in this way you now just need to do the following:

import express from 'express'
import postgraphql from 'postgraphql'

const app = express()

app.use(postgraphql('postgres://localhost:5432'))

app.listen(3000)

To learn more about all of the options available when using PostGraphQL as a library, read the documentation article here.