Tag: contentful
-
GraphQL query: how to map a list of ids to the corresponding entities?
0 I am working with Contentful CMS GraphQL API. I have a field that contains a list of id’s: I’d like to retrieve the entities corresponding to those id’s. I can do it with a second query: But I’d like to do it on the fly, in the first query. I suppose some code should…
-
Invariant Violation: Encountered an error trying to infer a GraphQL type for: `tags___NODE`
0 I am new to Gatsby. I’m creating a blog site using Gatsby and Contentful as CMS. On creating a field ‘timeToRead’ I’m getting an error as ERROR #11321 API.NODE.EXECUTION "gatsby-source-contentful" threw an error while running the sourceNodes lifecycle: _node$fields.includes is not a function However whenever I clear cache and rebuild the appliction it works…
-
Gatsby ,GraphQl content mapping bug
0 I am using Gatsby, GraphQl, and contentful. In my project i am trying to connect specific banner section to specific page (like home page should have banner of home and similarly for about us page and other pages) and i am writing my code for banner in banner.jsx . so the approach is every…
-
Contentful GraphQL endpoint: how to retrieve all entries of a content type
3 { Post { name } } While trying to retrieve all the entries on a content type, it only gives error of: "Argument "id" of required type "String!" was not provided." Since id field is required. How do I get all entries of a content type then? Ref: https://www.contentful.com/developers/docs/references/graphql/ graphql contentful Share Follow asked…
-
How can I cache nested objects with Apollo Client?
3 I’m using the Contentful GraphQL API to fetch a collection of items, in this example football clubs. query Clubs($limit: Int!, $skip: Int!) { clubCollection(limit: $limit, skip: $skip) { total items { name description } } } The structure of the response is: clubCollection: { items: [{ … array of all the clubs }] }…