Skip to content

Commit 8278a36

Browse files
authored
Merge pull request #941 from constructive-io/devin/1774947984-blueprint-node-type-registry
feat: move node-type-registry to graphql/ and update for blueprint redesign
2 parents 74a3d84 + ff94a16 commit 8278a36

67 files changed

Lines changed: 2828 additions & 7484 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import type {
3131
const definition: BlueprintDefinition = {
3232
tables: [
3333
{
34-
ref: 'tasks',
3534
table_name: 'tasks',
3635
nodes: [
3736
'DataId',
@@ -48,11 +47,17 @@ const definition: BlueprintDefinition = {
4847
relations: [
4948
{
5049
$type: 'RelationBelongsTo',
51-
source_ref: 'tasks',
52-
target_ref: 'projects',
50+
source_table: 'tasks',
51+
target_table: 'projects',
5352
delete_action: 'c',
5453
},
5554
],
55+
unique_constraints: [
56+
{
57+
table_name: 'tasks',
58+
columns: ['title', 'owner_id'],
59+
},
60+
],
5661
};
5762
```
5863

@@ -61,7 +66,7 @@ const definition: BlueprintDefinition = {
6166
When node type definitions are added or modified, regenerate with:
6267

6368
```bash
64-
cd graphile/node-type-registry && pnpm generate:types
69+
cd graphql/node-type-registry && pnpm generate:types
6570
```
6671

6772
This produces `src/blueprint-types.generated.ts` from the TS node type source of truth.
@@ -71,5 +76,5 @@ This produces `src/blueprint-types.generated.ts` from the TS node type source of
7176
Generate SQL seed scripts for `node_type_registry` table:
7277

7378
```bash
74-
cd graphile/node-type-registry && pnpm generate:seed --pgpm ../../constructive-db/packages/metaschema
79+
cd graphql/node-type-registry && pnpm generate:seed --pgpm ../../constructive-db/packages/metaschema
7580
```

graphile/node-type-registry/src/authz/authz-allow-all.ts renamed to graphql/node-type-registry/src/authz/authz-allow-all.ts

File renamed without changes.

graphile/node-type-registry/src/authz/authz-composite.ts renamed to graphql/node-type-registry/src/authz/authz-composite.ts

File renamed without changes.

graphile/node-type-registry/src/authz/authz-deny-all.ts renamed to graphql/node-type-registry/src/authz/authz-deny-all.ts

File renamed without changes.

graphile/node-type-registry/src/authz/authz-direct-owner-any.ts renamed to graphql/node-type-registry/src/authz/authz-direct-owner-any.ts

File renamed without changes.

graphile/node-type-registry/src/authz/authz-direct-owner.ts renamed to graphql/node-type-registry/src/authz/authz-direct-owner.ts

File renamed without changes.

graphile/node-type-registry/src/authz/authz-entity-membership.ts renamed to graphql/node-type-registry/src/authz/authz-entity-membership.ts

File renamed without changes.

graphile/node-type-registry/src/authz/authz-member-list.ts renamed to graphql/node-type-registry/src/authz/authz-member-list.ts

File renamed without changes.

0 commit comments

Comments
 (0)