graphile-build-pg
Advanced tools
Comparing version 4.0.0-rc.6 to 4.0.0-rc.8
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1093380
53
+ Addedgraphile-build@4.0.0-rc.8(transitive)
+ Addedgraphql-parse-resolve-info@4.0.0-rc.8(transitive)
- Removedgraphile-build@4.0.0-rc.6(transitive)
- Removedgraphql-parse-resolve-info@4.0.0-rc.6(transitive)
Updatedgraphile-build@4.0.0-rc.8