Closed toki-developer closed 1 month ago
Hi this is supported in Hasura v3 (See docs) E.g. relationship definition can be:
kind: Relationship
version: v1
definition:
name: ethereum
sourceType: account
target:
model:
name: blockchain
subgraph: blockchain
relationshipType: Object
mapping:
- source:
fieldPath:
- fieldName: wallet_address
target:
modelField:
- fieldName: wallet_address
- source:
value:
literal: 1
target:
argument:
argumentName: chain_id
I did not know that. Thank you very much. This Issue is closed.
Component
c/v3-engine
Is your proposal related to a problem?
I want to create object relationships with fixed values for sorting.
blockchain.chain_id = 1
blockchain.chain_id = 137
I want to get data from account.ethereum, account.polygon, etc. It is possible to use an Array Relationship and retrieve data with a query using
where:{chain_id:{_eq:1}}
, etc. However, since it is an Array Relationship, it cannot be sorted.※ Please do not point out the composition since it is an example. I want to create a Relationship using fixed values.