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

Support changing Session within a Transaction #987

Open
CarsonF opened this issue May 1, 2024 · 3 comments
Open

Support changing Session within a Transaction #987

CarsonF opened this issue May 1, 2024 · 3 comments
Labels
upstream:edgedb Issue produced by changes to EdgeDB/EdgeQL

Comments

@CarsonF
Copy link
Collaborator

CarsonF commented May 1, 2024

Add binding support for edgedb/edgedb#7187

client..transaction((tx) => {
  tx.withGlobals({ foo: 'bar' });
});

How should/can this be limited to only 4.8/5.0+ instances?

@scotttrinh
Copy link
Collaborator

How should/can this be limited to only 4.8/5.0+ instances?

IMO, on earlier versions we continue to silently fail, which is exactly as bad as the current state.

@scotttrinh scotttrinh added the upstream:edgedb Issue produced by changes to EdgeDB/EdgeQL label May 1, 2024
@CarsonF
Copy link
Collaborator Author

CarsonF commented May 1, 2024

IMO, on earlier versions we continue to silently fail, which is exactly as bad as the current state.

Well it was only a silent failure for me before because I was patching into the driver internals. Official types simply did not allow this.

@scotttrinh
Copy link
Collaborator

Then I think it's fine to allow it in the types but have it not work on versions that do not support this. This is runtime-only information that I don't think makes sense to contort ourselves into making a compile-time error however nice that would be for consumers 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream:edgedb Issue produced by changes to EdgeDB/EdgeQL
Projects
None yet
Development

No branches or pull requests

2 participants