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 deprecated subscriptions #5662

Merged
merged 7 commits into from
Oct 16, 2024
Merged

Conversation

angrykoala
Copy link
Member

@angrykoala angrykoala commented Oct 14, 2024

Description

Removes support for non-cdc subscriptions. This means the only available engine for subscriptions is Neo4jGraphQLSubscriptionsCDCEngine:

new Neo4jGraphQL({
    typeDefs,
    driver,
    features: {
        subscriptions: new Neo4jGraphQLSubscriptionsCDCEngine({
            driver,
        }),
    },
});

The default behaviour of subscriptions has also been updated to use CDC, so now passing true will use the CDC engine with the default parameters and driver:

new Neo4jGraphQL({
    typeDefs,
    driver,
    features: {
        subscriptions: true,
    },
});

Remove support for relationship subscriptions:

  • *RelationshipCreated
  • *RelatiosnhipDeleted

A follow up PR will remove the deprecated code and update cypher

Copy link

changeset-bot bot commented Oct 14, 2024

🦋 Changeset detected

Latest commit: 74dfb4b

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

This PR includes changesets to release 4 packages
Name Type
@neo4j/graphql Major
neo-place Patch
apollo-subscriptions-server Patch
yoga-subscriptions-server Patch

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 force-pushed the remove-deprecated-subscriptions branch from 2daba97 to 98e04db Compare October 16, 2024 10:05
@angrykoala angrykoala force-pushed the remove-deprecated-subscriptions branch from 147eb3d to 98e04db Compare October 16, 2024 10:16
@angrykoala angrykoala marked this pull request as ready for review October 16, 2024 12:37
@angrykoala angrykoala force-pushed the remove-deprecated-subscriptions branch from 6632d95 to 3deeea3 Compare October 16, 2024 13:03
@angrykoala angrykoala force-pushed the remove-deprecated-subscriptions branch from 3deeea3 to 02124cc Compare October 16, 2024 13:06
Copy link
Contributor

@darrellwarde darrellwarde left a comment

Choose a reason for hiding this comment

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

The PR looks good, but I do think we should maybe re-discuss the API here?

.changeset/curly-taxis-sleep.md Outdated Show resolved Hide resolved
Comment on lines +12 to +14
subscriptions: new Neo4jGraphQLSubscriptionsCDCEngine({
driver,
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think let's leave this like this like now for this PR, but after seeing this and the fact that literally the only thing that can be passed in is the CDC engine, I'm definitely camp "this should be turned into an object for configuration" - maybe a follow-up PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

The one advantage of this is that it leaves the door open for capturing the events by extending this class, I know it is not the primary use case, but some users have been using the CDC subscriptions to capture these events for some external processing.

@angrykoala angrykoala merged commit 3a565a0 into 6.x Oct 16, 2024
@angrykoala angrykoala deleted the remove-deprecated-subscriptions branch October 16, 2024 15:55
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