graphile-build-pg
Advanced tools
Comparing version 4.0.0-rc.11 to 4.0.0-rc.12
The MIT License (MIT) | ||
===================== | ||
Copyright © `2017` Benjie Gillam | ||
Copyright © `2018` Benjie Gillam | ||
@@ -6,0 +6,0 @@ Permission is hereby granted, free of charge, to any person |
@@ -60,2 +60,3 @@ "use strict"; | ||
pro.pronargdefaults as "argDefaultsNum", | ||
pro.procost as "cost", | ||
exists(select 1 from accessible_roles where has_function_privilege(accessible_roles.oid, pro.oid, 'EXECUTE')) as "aclExecutable" | ||
@@ -62,0 +63,0 @@ from |
@@ -26,2 +26,3 @@ export interface PgNamespace { | ||
tags: { [tag: string]: string | Array<string> }; | ||
cost: number; | ||
aclExecutable: boolean; | ||
@@ -28,0 +29,0 @@ } |
@@ -7,14 +7,2 @@ "use strict"; | ||
var _debug = require("debug"); | ||
var _debug2 = _interopRequireDefault(_debug); | ||
var _chalk = require("chalk"); | ||
var _chalk2 = _interopRequireDefault(_chalk); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
const debugWarn = (0, _debug2.default)("graphile-build-pg:warn"); | ||
exports.default = function PgQueryProceduresPlugin(builder, { pgSimpleCollections }) { | ||
@@ -31,3 +19,4 @@ const hasConnections = pgSimpleCollections !== "only"; | ||
describePgEntity, | ||
sqlCommentByAddingTags | ||
sqlCommentByAddingTags, | ||
swallowError | ||
} = build; | ||
@@ -79,5 +68,3 @@ const { | ||
} catch (e) { | ||
// eslint-disable-next-line no-console | ||
console.warn(_chalk2.default.bold.yellow(`Failed to add function '${proc.namespace.name}.${proc.name}'${debugWarn.enabled ? "" : `; run with 'DEBUG="graphile-build-pg:warn"' to view the error`}`)); | ||
debugWarn(e); | ||
swallowError(e); | ||
} | ||
@@ -84,0 +71,0 @@ } |
@@ -76,3 +76,3 @@ "use strict"; | ||
} else { | ||
throw new Error("You must provide a valid PG client configuration"); | ||
throw new Error("You must provide either a pg.Pool or pg.Client instance or a PostgreSQL connection string."); | ||
} | ||
@@ -79,0 +79,0 @@ result = await fn(pgClient); |
{ | ||
"name": "graphile-build-pg", | ||
"version": "4.0.0-rc.11", | ||
"version": "4.0.0-rc.12", | ||
"description": "Build a GraphQL schema by reflection over a PostgreSQL schema. Easy to customize since it's built with plugins on graphile-build", | ||
@@ -42,3 +42,3 @@ "main": "node8plus/index.js", | ||
"debug": ">=2 <3", | ||
"graphile-build": "4.0.0-rc.11", | ||
"graphile-build": "4.0.0-rc.12", | ||
"graphql-iso-date": "^3.2.0", | ||
@@ -45,0 +45,0 @@ "jsonwebtoken": "^8.1.1", |
# graphile-build-pg | ||
`graphile-build-pg` is a collection of plugins for `graphile-build` that allow | ||
you to extend your GraphQL schema with high-performance types and fields based | ||
on resources found in your PostgreSQL database schema. | ||
<span class="badge-patreon"><a href="https://patreon.com/benjie" title="Support Graphile development on Patreon"><img src="https://img.shields.io/badge/donate-via%20Patreon-orange.svg" alt="Patreon donate button" /></a></span> | ||
[![Discord chat room](https://img.shields.io/discord/489127045289476126.svg)](http://discord.gg/graphile) | ||
[![Package on npm](https://img.shields.io/npm/v/graphile-build-pg.svg?style=flat)](https://www.npmjs.com/package/graphile-build-pg) | ||
![MIT license](https://img.shields.io/npm/l/graphile-build-pg.svg) | ||
[![Follow](https://img.shields.io/badge/twitter-@GraphileHQ-blue.svg)](https://twitter.com/GraphileHQ) | ||
The plugins here-in do not exhibit the N+1 query problem common in many | ||
database-based GraphQL APIs thanks to graphile-build's advanced | ||
[query look-ahead](https://www.graphile.org/graphile-build/look-ahead/) | ||
features, they're more efficient, even, than `DataLoader`-based solutions. | ||
`graphile-build-pg` is a collection of Graphile Engine plugins that allow you | ||
to extend your GraphQL schema with high-performance types and fields based on | ||
resources found in your PostgreSQL database schema. | ||
Thanks to Graphile Engine's advanced [query | ||
look-ahead](https://www.graphile.org/graphile-build/look-ahead/) features, | ||
the plugins in this package do not exhibit the N+1 query problem common in | ||
many database-based GraphQL APIs. For all but the flattest GraphQL queries | ||
these plugins typically outperform `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. | ||
[PostGraphile](https://github.com/graphile/postgraphile) which with one | ||
command connects to your PostgreSQL database and provides a full highly | ||
performant standards-compliant GraphQL API. | ||
**It is recommended that you use PostGraphile directly unless you really want to | ||
get low level access to this library.** | ||
**It is recommended that you use PostGraphile directly unless you really want | ||
to get low level access to this library.** | ||
@@ -23,6 +30,6 @@ If you prefer to use the plugins yourself it's advised that you use the | ||
based on that into which you may insert or remove specific plugins. This is | ||
because it is ordered in a way to ensure the plugins work correctly (and we may | ||
still split up or restructure the plugins within it). | ||
because it is ordered in a way to ensure the plugins work correctly (and we | ||
may still split up or restructure the plugins). | ||
### `defaultPlugins` | ||
### Export: `defaultPlugins` | ||
@@ -29,0 +36,0 @@ An array of graphql-build plugins in the correct order to generate a |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
60
1212698
6876
+ Addedgraphile-build@4.0.0-rc.12(transitive)
+ Addedgraphql-parse-resolve-info@4.0.0-rc.12(transitive)
- Removedgraphile-build@4.0.0-rc.11(transitive)
- Removedgraphql-parse-resolve-info@4.0.0-rc.11(transitive)
Updatedgraphile-build@4.0.0-rc.12