You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't really know how else to title this issue, but here are the details:
Currently when asking the client for all Xs under Y (assets under franchise for example), if there are Xs it returns data as an array of objects. One for each X. Great!
...if there are no Xs, it returns Y's top level properties of meta, data, jsonapi, etc.
Perhaps this is expected behavior as written, but I feel it would be more intuitive to simply return an empty array if there are no Xs under Y. It's not an earth-shattering issue. Just something odd I noticed that might merit reexamination. This is otherwise a great client that has saved us a lot of time and headache!
Thanks, Paul Dmytrewycz (KET)
The text was updated successfully, but these errors were encountered:
Hi Paul -- sorry for the delay, I've been away for the holidays.
This is somewhat expected behavior, I think, since the main thing this client does is just format the request to the API and pass back the raw results (unless there's an error). Can you confirm a specific call this does this for? it may make sense for us to add a flag to just return that empty array.
I didn't really know how else to title this issue, but here are the details:
Currently when asking the client for all Xs under Y (assets under franchise for example), if there are Xs it returns data as an array of objects. One for each X. Great!
...if there are no Xs, it returns Y's top level properties of meta, data, jsonapi, etc.
Perhaps this is expected behavior as written, but I feel it would be more intuitive to simply return an empty array if there are no Xs under Y. It's not an earth-shattering issue. Just something odd I noticed that might merit reexamination. This is otherwise a great client that has saved us a lot of time and headache!
Thanks, Paul Dmytrewycz (KET)
The text was updated successfully, but these errors were encountered: