Socket
Socket
Sign inDemoInstall

graphile-build-pg

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphile-build-pg - npm Package Compare versions

Comparing version 4.0.0-rc.6 to 4.0.0-rc.8

4

package.json
{
"name": "graphile-build-pg",
"version": "4.0.0-rc.6",
"version": "4.0.0-rc.8",
"description": "Build a GraphQL schema by reflection over a PostgreSQL schema. Easy to customize since it's built with plugins on graphile-build",

@@ -40,3 +40,3 @@ "main": "node8plus/index.js",

"debug": ">=2 <3",
"graphile-build": "4.0.0-rc.6",
"graphile-build": "4.0.0-rc.8",
"graphql-iso-date": "^3.2.0",

@@ -43,0 +43,0 @@ "jsonwebtoken": "^8.1.1",

@@ -9,9 +9,9 @@ # graphile-build-pg

database-based GraphQL APIs thanks to graphile-build's advanced
[look-ahead](https://www.graphile.org/graphile-build/look-ahead/) features,
they're more efficient, even, than `DataLoader`-based solutions.
[query look-ahead](https://www.graphile.org/graphile-build/look-ahead/)
features, they're more efficient, even, than `DataLoader`-based solutions.
An example of an application built on `graphile-build-pg` is [PostGraphile
v4+](https://github.com/graphile/postgraphile) which allows you to run just
one command to instantly get a fully working and secure GraphQL API up and
running based on your PostgreSQL database schema.
An example of an application built on `graphile-build-pg` is
[PostGraphile v4+](https://github.com/graphile/postgraphile) which allows you
to run just one command to instantly get a fully working and secure GraphQL API
up and running based on your PostgreSQL database schema.

@@ -33,10 +33,2 @@ **It is recommended that you use PostGraphile directly unless you really want to

### `inflections`
This is a list of inflection engines, we currently have the following:
* `defaultInflection` - a sensible default
* `postGraphileInflection` - as above, but enums get converted to `CONSTANT_CASE`
* `postGraphileClassicIdsInflection` - as above, but `id` attributes get renamed to `rowId` to prevent conflicts with `id` from the Relay Global Unique Object Specification.
### Manual usage

@@ -46,16 +38,11 @@

import { defaultPlugins, getBuilder } from "graphile-build";
import {
defaultPlugins as pgDefaultPlugins,
inflections: {
defaultInflection,
},
} from "graphile-build-pg";
import { defaultPlugins as pgDefaultPlugins } from "graphile-build-pg";
async function getSchema(pgConfig = process.env.DATABASE_URL, pgSchemas = ['public'], additionalPlugins = []) {
async function getSchema(
pgConfig = process.env.DATABASE_URL,
pgSchemas = ["public"],
additionalPlugins = []
) {
return getBuilder(
[
...defaultPlugins,
...pgDefaultPlugins,
...additionalPlugins
],
[...defaultPlugins, ...pgDefaultPlugins, ...additionalPlugins],
{

@@ -65,3 +52,2 @@ pgConfig,

pgExtendedTypes: true,
pgInflection: defaultInflection,
}

@@ -68,0 +54,0 @@ );

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc