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 single relationships #5819

Open
wants to merge 14 commits into
base: 7.x
Choose a base branch
from
Open

Conversation

angrykoala
Copy link
Member

Description

Removes 1-1 relationships

Copy link

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: f4f3f45

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

@angrykoala angrykoala marked this pull request as ready for review November 19, 2024 15:23
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.

Lovely! Just left some comments

@@ -176,6 +176,7 @@ export function createRelationshipFields({
userDefinedFieldDirectivesForNode: Map<string, Map<string, DirectiveNode[]>>;
features?: Neo4jFeaturesSettings;
}): void {
// HERE?
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// HERE?

const isList = Boolean(getListTypeNode(field));

if (isRelationship && !isList) {
console.warn(
Copy link
Contributor

Choose a reason for hiding this comment

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

I would change this to be a validation rule, so that an error is raised before reaching make-augmented-schema

type ${typePost} @node {
id: String
content: String
creator: ${typeUser}! @relationship(type: "HAS_POST", direction: IN)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this test no longer necessary?

type ${typePost} @node {
id: String
content: String
creator: ${typeUser}! @relationship(type: "HAS_POST", direction: IN)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, is there is any reason to delete this test rather than change the creator type

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