Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PatchSchema syntax sugar for RelationType in foreign relations #1772

Closed
Tracked by #1002
AndrewSisley opened this issue Aug 11, 2023 · 1 comment
Closed
Tracked by #1002
Assignees
Labels
area/schema Related to the schema system feature New feature or request
Milestone

Comments

@AndrewSisley
Copy link
Contributor

AndrewSisley commented Aug 11, 2023

Part of #1002

  • The ONE/MANY bit should be auto set from kind
  • The ONEONE/ONEMANY bit should be auto set from kins (need to look at both sides)
  • The primary bit needs to follow the GQL default logic (move?), and have a means to be explicitly set by the user without defining the full bitmap
  • The InternalId should be auto set from Kind (should be done independently of auto-create of _id field, as the user may have reason to explicitly define part of the _id field - particularly if in the future we decouple the name from function)

See also semi-related: #2287

@AndrewSisley AndrewSisley added feature New feature or request area/schema Related to the schema system labels Aug 11, 2023
@AndrewSisley AndrewSisley added this to the DefraDB v0.7 milestone Aug 11, 2023
@AndrewSisley AndrewSisley changed the title Add PatchSchemasyntax sugar for RelationType in foreign relations Add PatchSchema syntax sugar for RelationType in foreign relations Aug 11, 2023
@AndrewSisley AndrewSisley self-assigned this Aug 15, 2023
@AndrewSisley
Copy link
Contributor Author

Under discussion

@AndrewSisley AndrewSisley modified the milestones: DefraDB v0.7, DefraDB v0.8 Sep 18, 2023
@AndrewSisley AndrewSisley removed their assignment Sep 18, 2023
@AndrewSisley AndrewSisley removed this from the DefraDB v0.8 milestone Sep 18, 2023
@AndrewSisley AndrewSisley self-assigned this Feb 6, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.10 milestone Feb 6, 2024
AndrewSisley added a commit that referenced this issue Feb 7, 2024
## Relevant issue(s)

Resolves #2287 #1772

## Description

Replaces `FieldDescription.RelationType` with an `IsPrimary` boolean.

One notable effect of this that may not be easily visible in the
code-diff is that the schema ID will not change depending on whether it
is the primary side of a one-one or on the one side of a one-many - now
the schema only cares about the shape of the data, not what is on the
other side of the relationship.
shahzadlone pushed a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
…work#2288)

## Relevant issue(s)

Resolves sourcenetwork#2287 sourcenetwork#1772

## Description

Replaces `FieldDescription.RelationType` with an `IsPrimary` boolean.

One notable effect of this that may not be easily visible in the
code-diff is that the schema ID will not change depending on whether it
is the primary side of a one-one or on the one side of a one-many - now
the schema only cares about the shape of the data, not what is on the
other side of the relationship.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema Related to the schema system feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant