Skip to content

Commit ee86237

Browse files
committed
Add custom types on cypher thread + apply bolt types on receive
1 parent ba9eef1 commit ee86237

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/shared/services/bolt/bolt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ function routedWriteTransaction (
104104
record._fieldLookup
105105
)
106106
if (typedRecord._fields) {
107-
typedRecord._fields = typedRecord._fields.map(field =>
108-
mappings.applyGraphTypes(field)
107+
typedRecord._fields = mappings.applyGraphTypes(
108+
typedRecord._fields
109109
)
110110
}
111111
return typedRecord

src/shared/services/bolt/boltWorkerMessages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* You should have received a copy of the GNU General Public License
1818
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1919
*/
20-
20+
import { recursivelyTypeGraphItems } from './boltMappings'
2121
export const RUN_CYPHER_MESSAGE = 'RUN_CYPHER_MESSAGE'
2222
export const CANCEL_TRANSACTION_MESSAGE = 'CANCEL_TRANSACTION_MESSAGE'
2323
export const CYPHER_ERROR_MESSAGE = 'CYPHER_ERROR_MESSAGE'
@@ -51,7 +51,7 @@ export const cancelTransactionMessage = id => {
5151
export const cypherResponseMessage = result => {
5252
return {
5353
type: CYPHER_RESPONSE_MESSAGE,
54-
result
54+
result: recursivelyTypeGraphItems(result)
5555
}
5656
}
5757

0 commit comments

Comments
 (0)