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

GraphConstraintCreate/Delete Seems incomplete #483

Closed
bcotton opened this issue Feb 27, 2024 · 2 comments · Fixed by #484
Closed

GraphConstraintCreate/Delete Seems incomplete #483

bcotton opened this issue Feb 27, 2024 · 2 comments · Fixed by #484

Comments

@bcotton
Copy link

bcotton commented Feb 27, 2024

Using RedisGraph I'm trying to add a constraint:

GRAPH.CONSTRAINT CREATE service-model unique node Component properties 1 name

The return from the builder function for GraphConstraintCreate() returns no Graph() builder for the graph or the rest of the constraint.

{"time":"2024-02-27T19:54:53.908082495Z","level":"ERROR","msg":"Error creating unique constraint for Component","error":"wrong number of arguments for 'graph.CONSTRAINT' command"}
panic: wrong number of arguments for 'graph.CONSTRAINT' command

Unless I'm missing something?

@bcotton bcotton changed the title GraphConstraintCreate/Delete Seem incomplete GraphConstraintCreate/Delete Seems incomplete Feb 27, 2024
@rueian
Copy link
Collaborator

rueian commented Feb 28, 2024

Hi @bcotton, thank you for reporting this issue.

The command builder is generated from a copy of https://github.com/RedisGraph/RedisGraph/blob/master/commands.json.

It looks like the command definitions are incomplete as well.

Thankfully we have our copy https://github.com/redis/rueidis/blob/main/hack/cmds/commands_graph.json, we can complete the definitions there.

@rueian
Copy link
Collaborator

rueian commented Feb 29, 2024

Hi @bcotton,

This fix will be released in the next few weeks. Before that, you can use the client.B().Arbitrary() builder instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants