-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
The current relay hash id is a has of a json representation of the table structure.
{"table" : {"schema" : "public", "name" : "test"}, "columns" : {"id" : 1}}
This generated a very long hash
eyJ0YWJsZSIgOiB7InNjaGVtYSIgOiAicHVibGljIiwgIm5hbWUiIDogInRlc3QifSwgImNvbHVtbnMiIDogeyJpZCIgOiAxfX0=
Is there a good reason to hash a json like this? instead of a minimal version?
public:test:1 which generates a hash of cHVibGljOnRlc3Q6MQ==
This id would be better for data transfer size and if people used the hash in the URL /projects/cHVibGljOnRlc3Q6MQ==
The advantage of a json would be that it's easier to decode and use if your app.
A side note, how does hasura relay handle multiple primary keys that are composite keys rather than an id field?