hasura / hasura/graphql-engine
Can I use a UUID[] of foreign keys as a relationship?
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
I don't expect this to work, but wondered if there was some way that Hasura could handle an array of foreign keys to manage a one-to-many relationship.
In my example, I have a series of UUIDs stored in an array that correspond to primary keys in another table. I'd love to navigate them as edges, but alas:
```
"error": {
"exec_status": "FatalError",
"hint": "No operator matches the given name and argument types. You might need to add explicit type casts.",
"message": "operator does not exist: uuid[] = uuid",
"status_code": "42883",
"description":
},
```
Contributor guide
Research direction
No repository files or tests are named. Start with the UUID[] example and the reported PostgreSQL `uuid[] = uuid` error, then determine whether array foreign keys can be exposed as relationship edges. Done would require an agreed answer or implementation scope, plus coverage for the supported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, postgres
- Domain
- api, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100