-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
feat(adapter-neo4j): use isolated session per read/write transaction #8364
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@GregCKrause is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
* | ||
* CREATE INDEX verification_token_composite_index IF NOT EXISTS | ||
* FOR (v:VerificationToken) ON (v.identifier, v.token); | ||
* ``` | ||
*/ | ||
export function Neo4jAdapter(session: Session): Adapter { | ||
const { read, write } = client(session) | ||
export function Neo4jAdapter(driver: Driver): Adapter { |
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.
Changing this signature would mean that this is a breaking change. Would this still be compatible with v4?
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.
Are you referring to v4 of next-auth or the neo4j-driver package?
This would be a breaking change for the Neo4jAdapter, as sessions would no longer be accepted arguments.
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.
Thanks! I am trying to understand if this PR should be considered breaking. Can you verify?
Hey, @balazsorban44! You raised some good concerns here. I am going to work on the following today:
This does introduce a breaking change to the Neo4jAdapter. Do I need to change the associated commit message to include |
@GregCKrause, thank you very much for this PR. Sad to see that your hard work didn't make it into the package. However I wanted to let you know that I was able to fix the errors mentioned in #5849 on my side with the edits in this PR. Much appreciated! |
☕️ Reasoning
This change utilizes a session-per-transaction approach with the Neo4j adapter, rather than creating and maintaining a single session.
As per Neo4j docs, "multiple sessions are required to execute parallel queries".
🧢 Checklist
🎫 Affected issues
May affect #5849