Questions tagged [contentful]

Contentful is a cloud based CMS framework using a RESTful JSON API.

Provides a content infrastructure for digital teams to power content in websites, apps, and devices. Unlike many other content management systems, Contentful was built to integrate with the modern software stack. It offers a central hub for structured content, powerful management, and delivery APIs, and a customizable web app that enables developers and content creators to ship digital products faster.

859 questions
4
votes
1 answer

Filtering by dates in Gatsby and Contentful

How can you filter by dates in Gatsby? The docs allude to lt and gt operators, I get errors when I try to use them.
Dom Barker
  • 1,889
  • 1
  • 16
  • 29
4
votes
1 answer

How to fetch a single entry from Contentful and query by field value?

I am trying to retrieve a single entry based on the name custom field of my entry. I have tried using the JS SDK with various options: client.getEntry("entryID") // .where("content_type", "Restaurant") // .where("fields.name[match]",…
Stretch0
  • 8,362
  • 13
  • 71
  • 133
4
votes
1 answer

GraphQL queries for Gatsby - Contentful setup with a flexible content model

I have a gatsby site with the contentful plugin and graphql queries (setup is working). [EDIT] My gatsby setup pulls data dynamically using the pageCreate feature. And populates my template component, the root graphql query of which I've shared…
Misha S
  • 43
  • 6
4
votes
3 answers

GraphQL disable filtering if filter variable is empty

I have a Gatsby GraphQL query for a list of posts ordered by date and filtered by category. { posts: allContentfulPost( sort: {fields: [date], order: DESC}, filter: {category: {slug: {eq: $slug}}} ) { edges { node { …
Janosh
  • 3,392
  • 2
  • 27
  • 35
4
votes
1 answer

Commas Appearing in Javascript rendered HTML

I am rendering HTML with Javascript and Contentful. My code: contentfulClient.getEntries({ content_type: PRODUCT_CONTENT_TYPE_ID, order: '-fields.dateRated' }) .then(function(entries) { container.innerHTML =…
4
votes
2 answers

GatsbyJs - How to handle empty graphql node from Contentful plugin

I am building a site in Gatsbyjs that pulls information in via the gatsby-source-contentful plugin, but I'm struggling with the graphql side of things. If I have a Content model in Contentful that contains a field to override the default description…
4
votes
2 answers

Gatsby and GraphQL - How to Filter Array Within Query

I started using Gatsby along with GraphQL to return a query that lists all galleries that are part of a specific category. In this example the category is called "Lifestyle". This all works successfully and I get an array with all of the Galleries…
Ryan Wiemer
  • 41
  • 1
  • 2
4
votes
0 answers

Get all posts of categories with just subcategories relations from GraphQL request

Have a simple model like post / category / subcategory with relation between posts <-> subcategories & categories <-> subcategories. Questions are : How to make the GraphQL request with the gatsby-source-contentful plugin in order to get all post…
wabdsgn
  • 71
  • 5
4
votes
2 answers

update an entry in contentful with an reference field

I am working on a project with Contentful, using the contentful-management node module, with Javascript. I am trying to create an reference in an entry containing a new entry. I get the following message in the browser console: Uncaught (in…
Sara
  • 41
  • 1
  • 4
4
votes
2 answers

Parse url hash fragment in express application

I am writing a express application, and I have to authenticate the user using oauth 2.0 flow. I have successfully redirected the user to the oauth provider and the provider send the access token in the oauth callback. Something…
Syed
  • 1,461
  • 3
  • 19
  • 37
4
votes
2 answers

Contentful API returning 'version mismatch' on entry update

I'm attempting to do the following with the Content Management API for Contentful: Get an entry (entry1) Find another entry (entry2) using data from a field in entry1 Update entry1 with data from entry2 My code looks like…
CaribouCode
  • 13,998
  • 28
  • 102
  • 174
3
votes
0 answers

How to include tags names in Contentful API object

I'm trying to get attached to an object tags list with tags names, and couldn't find any documentation how to do this. Right now my object looks like this using await $contentful.getEntry(route.params.id): { "metadata": { "tags": [ { …
Vedmant
  • 2,265
  • 1
  • 27
  • 36
3
votes
0 answers

How to avoid Contentful rate-limit exhaustion DoS

We are building a public web app and have created custom API's that call out to Contentful to get various content entries like news articles. Some of our API's take the entry ID - ex 1m21P91ZPgQyJpT6Ck7oku - as a parameter (typically as part of the…
3
votes
1 answer

Update a Contentful post using PUT request via Postman

I'm trying to update a Contentful entry using Postman. What I did: In Contentful space, I created a test post to play with. Went to Settings - API Keys - Content management tokens and generated a Personal access token Created a GET request in…
user3297120
  • 61
  • 1
  • 3
3
votes
1 answer

Contentful: how to change the name of an entry?

I am trying to use the Contentful web interface to change the name of an entry. Attached is a screenshot. I have searched for 30 minutes for the button that lets me change the title from "untitled" to something else. Alas, it is nowhere to be…
John Miller
  • 388
  • 2
  • 8
  • 23