Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
graphile-build-pg
Advanced tools
Build a GraphQL schema by reflection over a PostgreSQL schema. Easy to customize since it's built with plugins on graphile-build
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.
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
features, they're more efficient, even, than DataLoader
-based solutions.
An example of an application built on graphile-build-pg
is
PostGraphile v4+ 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.
It is recommended that you use PostGraphile directly unless you really want to get low level access to this library.
If you prefer to use the plugins yourself it's advised that you use the
defaultPlugins
export from graphile-build-pg
and then create a new array
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).
defaultPlugins
An array of graphql-build plugins in the correct order to generate a
well-thought-out GraphQL object tree based on your PostgreSQL schema. This is
the array that postgraphile-core
uses.
import { defaultPlugins, getBuilder } from "graphile-build";
import { defaultPlugins as pgDefaultPlugins } from "graphile-build-pg";
async function getSchema(
pgConfig = process.env.DATABASE_URL,
pgSchemas = ["public"],
additionalPlugins = []
) {
return getBuilder(
[...defaultPlugins, ...pgDefaultPlugins, ...additionalPlugins],
{
pgConfig,
pgSchemas,
pgExtendedTypes: true,
}
);
}
4.0.0-rc.11 (2018-09-13)
FAQs
Build a GraphQL schema by reflection over a PostgreSQL schema. Easy to customize since it's built with plugins on graphile-build
The npm package graphile-build-pg receives a total of 30,288 weekly downloads. As such, graphile-build-pg popularity was classified as popular.
We found that graphile-build-pg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.