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

Bug: Cannot import temporal types from 4.3 #758

Open
wheresrhys opened this issue Jun 22, 2021 · 1 comment
Open

Bug: Cannot import temporal types from 4.3 #758

wheresrhys opened this issue Jun 22, 2021 · 1 comment
Labels

Comments

@wheresrhys
Copy link

As documented this should work

import {DateTime} from 'neo4j-driver/lib/temporal-types.js'

Although in my codebase I'm using require this should also work (and always has done)

Since 4.3 it's stopped working.

From looking at the source code I guess these should now be imported directly from the main export of the library, but the documentation has not been updated. Either way, it is still a breaking change within a minor release which isn't great

wheresrhys added a commit to Financial-Times/treecreeper that referenced this issue Jun 22, 2021
wheresrhys added a commit to Financial-Times/treecreeper that referenced this issue Jun 24, 2021
@darrellwarde
Copy link

@wheresrhys, just for your information, in order to access temporal types in the GraphQL Library (which is compatible with version 4.1, 4.2 and 4.3 of the driver), we do the following:

import neo4j from "neo4j-driver";
const DateTime = neo4j.types.DateTime;

Personally, whenever I use a library export from a nested directory, I assume that it could break at any time. I only assume that root-level exports won't break outside of a major release. That's just my opinion anyway! 🙂

@bigmontz bigmontz added the docs label Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants