-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entries not loading relations #8
Comments
Hey @jonvanputten, I'll take a look into it as soon as I can and let you know what I found. Cheers |
@jonvanputten I know this is old, but could you try on recent |
The error is still present - the include parameter added with include/2 does not lead to any relations actually loading. with {:ok, [entry], total: 1} <-
Entries
|> content_type("articleTemplate")
|> by(id: entry_id)
|> include(5)
|> fetch_all()
|> IO.inspect()
do
conn
|> assign(:entry, entry)
|> render("article_template_test.html")
end The output of IO.inspect() was no different from when include/2 is omitted entirely. |
Hello, the issue here might be that |
@jonvanputten @leohoe @evayde did anyone find a workaround? I'm encountering this issue now, I can see the call the library makes to the Contentful API is getting a lot of linked Entries in the 'include' section of the response, but haven't yet found a way to access these via the client library. It looks like most of the functions that contentful.ex/lib/contentful/query.ex Line 207 in c90493c
|
I've created a PR to address this #181 |
PR #181 been merged now, so this bug should be fixed @floriank. @jonvanputten and @leohoe take a look at version 0.6 that's just been published. With that version, if you set |
Hey Devs,
I have a Blogpost that contains one or more Authors. If I do:
Contentful.Delivery.entries(@space_id, @access_token)
I will get the content with the relations, but with nil:
%{"fields" => %{"author" => [nil, nil], "title" => "The article"
Even if I add the %{"include" => 2} as the search parameter, I will still get a nil. Is there another way to load the relations or am I doing it wrong?
The text was updated successfully, but these errors were encountered: