Skip to content
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

enhancement(gatsby-source-contentful) publishedAt and firstPublishedAt fields #24303

Closed
thijs-van-der-velden opened this issue May 21, 2020 · 6 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. topic: source-contentful Related to Gatsby's integration with Contentful type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement.

Comments

@thijs-van-der-velden
Copy link

thijs-van-der-velden commented May 21, 2020

Summary

Currently content nodes only pick up the updatedAt and createdAt fields from the contentful API response. I would like to suggest a change to also include the publishedAt and firstPublishedAt fields.

Motivation

I am working on a project that requires us to sort a list of entries by their publish date.

@thijs-van-der-velden thijs-van-der-velden added the type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement. label May 21, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 21, 2020
@thijs-van-der-velden thijs-van-der-velden changed the title publishedAt and firstPublishedAt fields enhancement(gatsby-source-contentful) publishedAt and firstPublishedAt fields May 21, 2020
@freiksenet
Copy link
Contributor

Hello @thijs-van-der-velden!

That would indeed be a nice feature. Would you be interested in creating a PR that would add that functionality? You would likely need to modify this file in contentful source.

Also pinging @axe312ger.

@freiksenet freiksenet added topic: source-contentful Related to Gatsby's integration with Contentful and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 22, 2020
@axe312ger
Copy link
Collaborator

The gatsby source plugin uses the sync api. The delivery/sync api does not have access to this attribute:

https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/common-resource-attributes

But the new Contentful graphql api does support this attribute:

https://www.contentful.com/developers/docs/references/graphql/#/reference/schema-generation/sys-field

As soon the gatsby source plugin supports the contentful graphql api, this tickets should be solved automatically. (See disclaimer: https://www.contentful.com/developers/docs/references/graphql/#/introduction/basic-api-information)

I'll readd it to the GitHub project so we can keep track of this :)

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Jun 16, 2020
@github-actions
Copy link

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

@chawes13
Copy link
Contributor

chawes13 commented May 26, 2022

Is this information available now? Having trouble locating it (7.6.1).

In the interim, I am able to derive this information from sys.revision, but ideally the date would be provided as well

@axe312ger
Copy link
Collaborator

@chawes13 no, you only have available what you see in GraphQL

The new version will contain the (first) publish date. see #31385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. topic: source-contentful Related to Gatsby's integration with Contentful type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement.
Projects
None yet
Development

No branches or pull requests

4 participants