question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does the contentful.js Javascript API support Link Resolution?

See original GitHub issue

You link to it in the README (https://www.contentful.com/developers/docs/concepts/links/), but does this Javascript library support the include parameter, as documented at https://www.contentful.com/developers/docs/concepts/links/#linked-entries ?

I can’t find anything about this in the documentation for this library.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

13reactions
Khaledgarbayacommented, Jul 2, 2016

Hi @maxkwallace ,

The documentation is is correct. The link resolution is done client side and it is done when you request collection of entries and not a single entry. example : https://contentful.github.io/contentful.js/contentful/3.4.3/ContentfulClientAPI.html#.getEntries

If you want to get a single entity with with resolved links you can usegetEntities with a search query {'sys.id':'entityId'}

I hope this help

9reactions
maxkwallacecommented, Jul 2, 2016

@Khaledgarbaya thanks! That’s helpful. Now I’m able to do what I wanted. Obviously it’s up to you whether to update the documentation, but as a point of feedback-- I found it unclear, and it didn’t answer my question (which is why I opened an issue in the first place).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started with Contentful and JavaScript
This article details how to retrieve entries using the JavaScript CDA client ... You can turn off link resolution when you initialize the...
Read more >
Linked entries and assets in Contentful
These will resolve your linked entries and assets for you. In this example, we'll be taking a look at the JavaScript SDK.
Read more >
Content Delivery API | Contentful
Note: Links in the Delivery API will always only resolve to published entries. Unresolved items will not be present in the includes array....
Read more >
Content Management API | Contentful
API Rate limits specify the number of requests a client can make to Contentful APIs in a specific time frame. Every request counts...
Read more >
contentful.js API Document
Troubleshooting · Can I use the SDK in react native projects. Yes it is possible · Link resolution does not work when using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found