Skip to content

Commit

Permalink
feat: make skipping NodePlugin easier (#319)
Browse files Browse the repository at this point in the history
Fixes #310
  • Loading branch information
benjie authored Oct 15, 2018
1 parent f437721 commit 532fd40
Show file tree
Hide file tree
Showing 4 changed files with 7,527 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export default (async function PgNodeAliasPostGraphile(builder) {
setNodeAlias,
inflection: { pluralize },
} = build;
if (!setNodeAlias) {
// Node plugin must be disabled.
return object;
}
const {
scope: { isPgRowType, isPgCompoundType, pgIntrospection: table },
} = context;
Expand Down
4 changes: 4 additions & 0 deletions packages/graphile-build-pg/src/plugins/PgRowNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export default (async function PgRowNode(builder) {
pgQueryFromResolveData: queryFromResolveData,
pgOmit: omit,
} = build;
if (!addNodeFetcherForTypeName) {
// Node plugin must be disabled.
return object;
}
const {
scope: { isPgRowType, pgIntrospection: table },
} = context;
Expand Down
Loading

0 comments on commit 532fd40

Please sign in to comment.