neo4j / docs-graphql

GraphQL docs
5 stars 9 forks source link

OGM subscription guide is out of date #161

Open mjfwebb opened 3 months ago

mjfwebb commented 3 months ago

https://neo4j.com/docs/graphql/current/ogm/subscriptions/

There is no longer a Neo4jGraphQLSubscriptionsSingleInstancePlugin() and the OGM constructor does not take a plugins property any longer. It has been replaced with a built-in subscription feature which is toggled using the features.subscriptions flag

Old:

const ogm = new OGM({
    typeDefs,
    driver,
    plugins: {
        subscriptions: subscriptionsPlugin
    },
});

New:


const ogm = new OGM({
    typeDefs,
    driver,
    features: {
        subscriptions: true
    },
});