Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set cypherVersionPrefix default value to true #5976

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

angrykoala
Copy link
Member

Description

Sets addVersionPrefix to true by default, this will prepend the Cypher version to all queries by default:

CYPHER 5
MATCH(this:Movie)

This may be incompatible with older versions of Neo4j and can be disabled by setting cypherQueryOption.addVersionPrefix in the context to false:

{
    cypherQueryOptions: {
        addVersionPrefix: true,
    },
}

For example, for an apollo server:

await startStandaloneServer(server, {
    context: async ({ req }) => ({
        req,
        cypherQueryOptions: {
            addVersionPrefix: false,
        },
    }),
    listen: { port: 4000 },
});

Copy link

changeset-bot bot commented Jan 29, 2025

🦋 Changeset detected

Latest commit: a3a6129

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 merged commit d3fa604 into 7.x Feb 11, 2025
37 checks passed
@angrykoala angrykoala deleted the set-default-cypherVersionPrefix branch February 11, 2025 10:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants