contentful.js icon indicating copy to clipboard operation
contentful.js copied to clipboard

when querying using links_to_entry you are not able to use Order

Open epic0tix opened this issue 6 years ago • 2 comments

Expected Behavior

client.getEntries({
                    "links_to_entry": locals.data.tag,
                    skip: 0, limit: 10, order: '-fields.published'
})

This should return an ordered result but it returns empty result.

Actual Behavior

Possible Solution

client.getEntries({
                    "links_to_entry": locals.data.tag,
                    skip: 0, limit: 10
})

This however returns a full result.

Steps to Reproduce

Context

Environment

  • Language Version: v10.15.3
  • Package Manager Version:
  • Browser Version:
  • Operating System: Windows 64
  • Package Version: 5.4.2
  • Which API are you using?: Delivery

epic0tix avatar Apr 02 '19 05:04 epic0tix

Hey @adamrogas, Thanks for reporting this. What's the type of fields.published? and can you get the order working without "links_to_entry": locals.data.tag?

Khaledgarbaya avatar Apr 02 '19 07:04 Khaledgarbaya

fields.published is date and when doing a normal query without links_to_entry it returns a full data set.

epic0tix avatar Apr 02 '19 17:04 epic0tix

Closing this for now as there hasn't been any activity in a while and we assume you were able to solve it at hand.

But feel free to reach out again if you have more questions.

marcolink avatar Jun 08 '23 10:06 marcolink