Skip to content

Commit b715f6d

Browse files
authored
fix: uniqueKey/pgViewUniqueKey applies to views (#739)
1 parent 9bd6c3b commit b715f6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/graphile-build-pg/src/plugins/PgAllRows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default (async function PgAllRows(
6464
const uniqueIdAttribute = viewUniqueKey
6565
? attributes.find(attr => attr.name === viewUniqueKey)
6666
: undefined;
67-
if (isView && table.tags.uniqueKey && !uniqueIdAttribute) {
67+
if (isView(table) && table.tags.uniqueKey && !uniqueIdAttribute) {
6868
throw new Error(
6969
`Could not find the named unique key '${table.tags.uniqueKey}' on view '${table.namespaceName}.${table.name}'`
7070
);

0 commit comments

Comments
 (0)