Open katarinasupe opened 3 weeks ago
@katarinasupe Memgraph currently works on basic CRUD operations, it does not work in some specific cases where the apoc
calls are needed.
The Neo4j graphQL changes the schema into the Cypher queries with hardcoded apoc
calls.
The option is to code apoc
modules into memgraph Mage modules that are missing and needed in the driver. Replace the apoc
call with the Memgrpah Mage call QM call.
So, to be able to do this, we first need to code the following QM:
apoc.util.validate
apoc.util.validatePredicate
After that Memgraph needs to understand that it needs to change the query, as a first step I am transferring this issue to the Mage repository.
I think it is better to code the QMs and change the apoc calls as we move towards cipher generation from LLMs and convert from apoc to MAGE calls.
So, @antejavor the above mentioned procedures need to be implemented and https://github.com/memgraph/mage/blob/bf4b04d10bc6750ba2b665399e48d893919c50d8/apoc_mappings.json updated to make GraphQL v5 work with Memgraph for basic CRUD operations if I understood correctly?
@katarinasupe , as a first step, we can implement just util.validatePredicate
in Mage, since it is not a void QM call, rather it returns the value. The util.validate
is a void call, it is not clear how it should be replaced from the user's perspective and apoc.util.validate
crashes Memgraph, as explained here. The linked issue is currently not blocker for GraphQL.
On mutation, you get the following error:
To reproduce, run the attached code. Open Apollo server on
localhost:4000
. Run the following code to create user nodes:Then, try the following mutation (connectOrCreate requires
@unique
decorator - we didn't document this well enough; it might have been added to never version):The above mutation results in the reported error, instead of creating a post.
This was reported on Discord.