-
Notifications
You must be signed in to change notification settings - Fork 153
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
+486
−14,529
Merged
Remove unique #5755
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d7c77a4
Remove unique directive and update tck tests
angrykoala 0d0c05c
remove connectOrCreate schemas
angrykoala eb5762d
Update integration tests without unique
angrykoala 9c75f92
Update changeset
angrykoala ddcd886
Remove some unused code
angrykoala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@neo4j/graphql": major | ||
--- | ||
|
||
Remove support for `connectOrCreate` operations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@neo4j/graphql": major | ||
--- | ||
|
||
Remove support for `@unique` directive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
packages/graphql/src/schema-model/annotation/UniqueAnnotation.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ import type { Attribute } from "../../attribute/Attribute"; | |
import { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapter"; | ||
import { RelationshipDeclarationAdapter } from "../../relationship/model-adapters/RelationshipDeclarationAdapter"; | ||
import type { RelationshipDeclaration } from "../../relationship/RelationshipDeclaration"; | ||
import { getFromMap } from "../../utils/get-from-map"; | ||
import { plural, singular } from "../../utils/string-manipulation"; | ||
import type { ConcreteEntity } from "../ConcreteEntity"; | ||
import type { InterfaceEntity } from "../InterfaceEntity"; | ||
|
@@ -36,7 +35,6 @@ export class InterfaceEntityAdapter { | |
public readonly attributes: Map<string, AttributeAdapter> = new Map(); | ||
public readonly relationshipDeclarations: Map<string, RelationshipDeclarationAdapter> = new Map(); | ||
public readonly annotations: Partial<Annotations>; | ||
private uniqueFieldsKeys: string[] = []; | ||
|
||
private _singular: string | undefined; | ||
private _plural: string | undefined; | ||
|
@@ -112,10 +110,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)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
|
||
public get sortableFields(): AttributeAdapter[] { | ||
return Array.from(this.attributes.values()).filter((attribute) => attribute.isSortableField()); | ||
} | ||
|
@@ -167,9 +161,6 @@ export class InterfaceEntityAdapter { | |
for (const [attributeName, attribute] of attributes.entries()) { | ||
const attributeAdapter = new AttributeAdapter(attribute); | ||
this.attributes.set(attributeName, attributeAdapter); | ||
if (attributeAdapter.isConstrainable() && attributeAdapter.isUnique()) { | ||
this.uniqueFieldsKeys.push(attribute.name); | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?