Questions tagged [graphcms]

A headless CMS built on GraphQL

GraphCMS is a content management system used to quickly build a GraphQL API.

37 questions
4
votes
2 answers

How can I load an i18n json from a CMS with i18next?

I am using https://github.com/i18next/next-i18next and rather than hardcoding the files, I want to use HygraphCMS (formerly GraphCMS) to provide those strings. What's the best way to approach this? If I wait for an async request, it'll slow things…
Shamoon
  • 41,293
  • 91
  • 306
  • 570
3
votes
4 answers

Why is graphcms graphql giving me a 403 error?

I created the following query in graphcms and it works in the graphql playground but when I transfer the query to my react code and try to access graphcms I get a 403 error shown below. The query: import { request, gql } from…
koque
  • 1,830
  • 5
  • 28
  • 49
2
votes
1 answer

Next.js: How to do client-side data fetching with grapql and headless CMS (graphCMS)

I'm currently facing an issue with fetching data in a client-side component using Next.js app dir, and I'm hoping to get some assistance with resolving it. I have a specific requirement where I need to fetch data with graphql from graphCMS within a…
tomess
  • 21
  • 5
1
vote
0 answers

Nextjs Build fail on Vercel

I'm trying to deploy my NextJs app (using GraphCMS) on Vercel. When I build the app on my computer it works fine, I can build and run the app locally but once I try to deploy the same exact app on Vercel it crash with this error TypeError: Cannot…
SuperPanda
  • 11
  • 2
1
vote
1 answer

I am trying to deploy a nextJS blog integrated with graphCMS to vercel but i am getting a couple of errors

After clicking on the framework preset and deploying to vercel, I get this error: No Next.js version could be detected in your project. Make sure "next" is installed in "dependencies" or "devDependencies" even though I have next in my dependencies…
1
vote
1 answer

Fetched data from GraphCMS using GraphQL in a NextJS project keeps retuning undefined values

I'm trying to use NextJS and GraphQL to fetch some data from GraphCMS to a page located at pages/writing.js. The problem is, doesn't matter what I do I get errors like TypeError: Cannot read properties of undefined (reading 'title'). I've been…
SnooDucks299792
  • 163
  • 1
  • 1
  • 11
1
vote
1 answer

GraphQl query image.url getting null or ' ' (empty string)

Hi im Using GraphCms to use GraphQl API and when i try to use data of image.url i get null or a void string. I check and the assets are published. this my react code: i get this error on console: {"errors":[{"message":"input:1: Field \"image\" of…
1
vote
0 answers

Pagination in GraphCMS (Graph-ql) in Nextjs

Can someone help me figure out how to implement pagination in a blogs list page? I have tried a couple of methods but all of them seem to break the site. There are over 100 pages and It should Display 6 per page and load 6 more at the bottom if 'see…
RiotPixel
  • 11
  • 1
1
vote
0 answers

Error 400 when trying to upload images to GraphCMS

I'm trying to upload an image when a form is submited, the problem comes when I try to send the image as a base64 to the upload endpoint. // Form input for image uploads
1
vote
1 answer

Query for specific files from GraphCMS Assets using GraphQL

I'm using GraphCMS as my CMS for my GatsbyJS site, and I want to query for a specific image files, which I can then use in a React component. When using localhost:8000___grapql I'm able to find all my assets using this path: { discord:…
Mathias Riis Sorensen
  • 504
  • 3
  • 13
  • 34
1
vote
1 answer

GraphQL query to filter GraphCMS posts

I'm working on a GraphCMS site in React and would like to set up a GraphQL query to filter posts. We have this query setup which works and fetches all posts (adoptions) : export const allAdoptions = gql` query allAdoptions($first: Int!, $skip:…
0
votes
0 answers

GraphQL deleteManyConnection not able to delete a record

I am implementing a function to delete a record from the database with graphql but it is giving me headaches now. I am using hygraph/graphcms on which the query is running perfectly fine but its not working in the code. Here is the query - const…
Kartik Thakur
  • 57
  • 1
  • 7
0
votes
1 answer

How add image to graphql from react

I use the following mutation for inserting an image into a post. mutation MyMutation { createPost( data: {title: "", excerpt: "", content: "", postid: "", featuredImage: {create: {fileName: "", handle: ""}}, author: {connect: {Author: {email:…
Frecoder
  • 23
  • 8
0
votes
0 answers

GraphCMS full Text Search Case In-sensitive

i recently started working with graphCMS and I am looking to implement the full text search functionality inside my nextjs app but i can't seem to find anything so I wanted to ask that currently does the graphCMS supports full text search or not? If…
Ateeb Asif
  • 94
  • 3
1
2 3