Custom variable parameter
Opened this issue · 2 comments
vikiival commented
Hey,
I found this library and is really nice and easy to use, however I found a case where I would need a help
I need to write query like
query ($owner: String!) {
nftEntities(where: {currentOwner_eq: $owner}) {
id
metadata
}
}
and so far my hack is
query({
operation: 'nfts: nfts: nftEntities(where: {currentOwner_eq: "vikiival"})',
fields: ['id', 'metadata']
})
The thing I need is to somehow wrap the variable into the object.
Question is: Is it possible to do that? Or should I just pass the whole object ({currentOwner_eq: "vikiival"}
) as the variable ?
toadkicker commented
You would want a GQL resolver to handle this problem I think
kingRayhan commented
I also need to know that