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

Remove unique #5755

Merged
merged 5 commits into from
Nov 5, 2024
Merged

Remove unique #5755

merged 5 commits into from
Nov 5, 2024

Conversation

angrykoala
Copy link
Member

@angrykoala angrykoala commented Nov 4, 2024

Description

Remove @unique directive and update tests

Some code is still leftover from connectOrCreate, which is implicitly removed by this PR

Copy link

changeset-bot bot commented Nov 4, 2024

🦋 Changeset detected

Latest commit: ddcd886

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@neo4j/graphql Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@MacondoExpress MacondoExpress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of leftover related to the the @unique fields but apart from that LGTM!

@@ -80,9 +79,6 @@ export class ConcreteEntityAdapter {

if (attributeAdapter.isConstrainable()) {
this.constrainableFieldsKeys.push(attribute.name);
if (attributeAdapter.isUnique()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the whole logic could isConstrainable can be removed from both here and Interfaces, could you confirm this?

@@ -112,10 +111,6 @@ export class InterfaceEntityAdapter {
* used to generate different types for the Entity that contains these Attributes
*/

public get uniqueFields(): AttributeAdapter[] {
return this.uniqueFieldsKeys.map((key) => getFromMap(this.attributes, key));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uniqueFieldsKeys attribute has to be removed as well

@angrykoala angrykoala merged commit 43ca46a into 7.x Nov 5, 2024
35 checks passed
@angrykoala angrykoala deleted the remove-unique branch January 6, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants