Tag: strapi
-
Using map on data from graphql
0 I have a nextjs app using typescript and a Strapi backend with graphql I’m trying to simple get the graphql from strapi and display it in the react app. I’m trying to display a list of font names. In react I have this query, this works in the playground import { gql } from…
-
GraphQL Mutation Error: “Field `parts` is not defined by type ‘ProjectInput’”
0 I am working on a GraphQL mutation to create a project with associated phones and their parts, in other words relationship between is so: Phone can have multiple parts. I have defined a schema for querying phones along with their parts. However, I am encountering an error when trying to create a project with…
-
Issue with React App Strapi GraphQL Mutation for Creating Comments
0 I’m currently facing an issue with my React app where I’m attempting to create a new entry using GraphQL mutation. When I executed the following code in the Strapi GraphQL playground, it worked successfully, and the entry appeared on the Strapi dashboard: mutation{ createComment( data: { userName: "Jane" content: "fdfddf" post: 3 publishedAt: "2023-08-19T06:32:49.783Z"…
-
How can we access the dynamically added component fields (i.e., JSON fields) using Strapi CMS?
0 Context: I have a custom component ( autocomplete with list of options from external api ) that allows me to select an option based on an API request. After the selection, the body of the option becomes part of the structure and looks like this (where ‘type’ is a field of the custom component):…
-
strapi collection types in gatsby missing
0 I have created some single types and som collection types in strapi. In my gatsby project, in the the gatsby-config.js file, I have placed the names of the single types and the collection type. collectionTypes: [‘heronodes’], singleTypes: [‘message’, ‘intro’, ‘hero’, ‘footer’], I can see all the single types in the graphql playground in gatsby,…
-
Strapi v4 too much nested data
5 I’m rewriting strapi v3 queries to v4 (GraphQL), and with new fields ‘data’ and ‘attributes’, I have a problem going too much deep into nested objects, an example of how data looks: user { data { id attributes { company { data { id attributes { location { data { id … } }…
-
Cannot access to data in title from Strapi with GraphQL and Nuxt.js
0 I have a project with Nuxt, GraphQL and Strapi. I cannot access to a article.data.attributes.title, but I can access to article.data.attributes. I have the error message : undefined is not an object (evaluating ‘_vm.article.data.attributes.title’). Weirdly, when I am updating from article.data.attributes to article.data.attributes.title, it is working, but just when I refresh the page, the…