graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

jsonb.path query - how do we query for all items in the array?

Open hrgui opened this issue 4 years ago • 9 comments

https://hasura.io/docs/1.0/graphql/manual/api-reference/graphql-api/query.html#simple-object

This returns 1 element:

contacts(path: "[0].phone") # scalar JSON field -> array_item_property

Want to return all phone numbers

contacts(path: "[*].phone") # scalar JSON field -> array_item_property

returns this error

parse json path error: [*].phone. Accept letters, digits, underscore (_) or hyphen (-) only. Use single quotes enclosed in bracket (['...']) if there is any special character

hrgui avatar Jun 25 '20 15:06 hrgui

This is not supported yet but we will be happy to take it up in a future release.

tirumaraiselvan avatar Jul 15 '20 07:07 tirumaraiselvan

Hey friends! Any news about?

mxaxs avatar May 06 '21 04:05 mxaxs

+1

christian-predebon avatar May 25 '21 15:05 christian-predebon

+1

gilvaju avatar Sep 29 '21 17:09 gilvaju

this is a very useful feature if JSONB can be filtered and iterated

jibrel avatar May 03 '22 21:05 jibrel

that would be amazing

DomVinyard avatar Apr 17 '23 08:04 DomVinyard

+1 on this, any update on this one?

MelodicCrypter avatar May 29 '23 04:05 MelodicCrypter

+1 any update?

brianlightfoot avatar Dec 18 '23 16:12 brianlightfoot

The same issue. Please!

alexandr-ku-MA avatar Jan 16 '24 12:01 alexandr-ku-MA