Skip to content

Commit

Permalink
chore(db): allow "sparse" on @entity
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedragon committed Jul 3, 2024
1 parent fd8e1db commit 0ab9948
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/sdk/src/store/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const customScalars = ['BigInt', 'BigDecimal', 'Timestamp', 'JSON', 'Bytes', 'ID

const baseSchema = buildASTSchema(
parse(`
directive @entity on OBJECT
directive @entity(immutable: Boolean! = false, sparse: Boolean! = false) on OBJECT
directive @query on INTERFACE
directive @derivedFrom(field: String!) on FIELD_DEFINITION
directive @unique on FIELD_DEFINITION
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/store/tests/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type User implements Owner @entity {
organizations: [Organization!]! @derivedFrom(field: "members")
}

type Organization implements Owner @entity {
type Organization implements Owner @entity(sparse: true) {
id: ID!
name: String!
members: [User!]!
Expand Down

0 comments on commit 0ab9948

Please sign in to comment.