Comments (2)
Hi @joeykilpatrick Thanks for reporting.
Drivine has a default result mapper. Given the goal of creating a library that supports building graph-powered REST APIs and similar, the rationale is to make 80% of such cases simpler and 20% possible.
It is possible to do what you would like. Here are some options:
Return the Id and Label Properties from Query:
MATCH (actor:Person {name: $1})
WITH actor, [(actor)-[:ACTED_IN]-(movie:Movie) | movie {.title, .tagline, .released}] as movies
RETURN {
id: id(actor), <--- HERE
labels: labels(actor), <-- AND HERE
actor: actor,
movies: movies
}
Plug in Your Own Result Mapper
Rather than use the default result mapper you can plug in your own. Would you like to contribute an alternative mapper that:
- Does what you want.
- Users can specify as a config options when bootstrapping (becomes the default) or when executing a query (overrides the default).
Such a mapper could be Neo4j-specific if you wished, would not have to be general case for all supported graph DBs.
Use Neo4j Driver directly.
Another option is to use Neo4j driver directly. This would be a good idea if you prefer that format, and also don't wish to use other Drivine features like the transaction system, cursors, etc.
I will leave this issue open in case you would like to pursue option #2 - Plug in your own mapper.
from drivine.
Closed for now @joeykilpatrick. Let me know if/when you would like to plug in a custom mapper, and we can help out.
(btw #53 Gets us most of the way there).
from drivine.
Related Issues (20)
- Migrating to agens-graph on my my nestjs app HOT 5
- TransactionContextMiddleware seems unnecessary HOT 5
- Error: variable does not exist - Apache AGE HOT 5
- Website is down HOT 1
- Could not perform discovery errors HOT 14
- drivine.org a sign of status? HOT 5
- Broken link for the user guide HOT 1
- Calling `RunWithDrivine()` when using `it.each` in a test file causes `TypeError: it.each is not a function` HOT 7
- Neo4j connections are not properly released when using @Transactional and concurrency HOT 11
- Transactional persistence manager is used when no @Transactional decorator is set when running concurrent queries HOT 11
- Domain drivine.org leads to 404 page HOT 2
- Mismatch between npm package licence and licens on github HOT 1
- Error: SRID expected to be either a number or an Integer object but was: undefined HOT 6
- @nestjs/common@">= 6 <= 7" from @liberation-data/[email protected] HOT 2
- Upgrade nanoid dependency version to solve moderate vulnerability
- Use Transactions in Tests HOT 3
- [Question] Possible to initialize with configuration (or any other injected service) and how are environment variables parsed? HOT 5
- [Bug] @InjectPersistenceManager not resolved as dependency when other @Inject parameters are present HOT 10
- [Docs] Show examples of unit testing with Drivine HOT 13
- [Docs] [Bug] The documentation site does not have a side menu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drivine.