Skip to content

Commit

Permalink
Demonstrate empty pre- and post- checks in Postgres mutations (#707)
Browse files Browse the repository at this point in the history
Co-authored-by: Sean Park-Ross <[email protected]>
  • Loading branch information
danieljharvey and seanparkross authored Oct 18, 2024
1 parent 2aaf9ea commit 47fe010
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,35 @@ definition:
literal: b1358c05-a457-41e7-b77e-56efce2cdd06
```

If we don't wish to provide any checks at this time, we can provide the following:

```hml
value:
booleanExpression:
and: []
```

For example, used here as both `pre-` and `post-` checks on an update mutation:

```hml
kind: CommandPermissions
version: v1
definition:
commandName: V2UpdateUsersById
permissions:
- role: admin
allowExecution: true
argumentPresets:
- argument: preCheck
value:
booleanExpression:
and: []
- argument: postCheck
value:
booleanExpression:
and: []
```

#### Step 4. Build and run

After editing the `.hml` files of your models, create a new build of our supergraph:
Expand Down

0 comments on commit 47fe010

Please sign in to comment.