Skip to content

Linking to entries with the same content model ignores the include parameter in getEntries creating circular references #1943

@Zac-Nourish

Description

Expected Behavior

When requesting entries from Contentful with getEntries() with an include parameter, all Links only resolve to the includes depth.

Actual Behavior

Entries with Links to the same content type resolve to an infinite level.

Possible Solution

Steps to Reproduce

  1. Create a space with a Content Model Test that has a Link property to to other entries of with type Test
  2. Create two entries A and B. Have A link to B and B link to A.
  3. Call getEntries with an include parameter of 0.
  4. See the response has a circular reference when it should not resolve any links at all.

Context

We are trying to create a resource that links to other related resources.

Environment

  • Language Version: v16.19.0
  • Package Manager Version: 8.19.3
  • Package Version: 10.2.3
  • Which API are you using?: Delivery

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions