I’m developing a blog on next.js with sanity.io, and I’m having trouble using the code-input plugin. What I do have I’m able to use the code component block on sanity, which looks something like this: Everything good on the sanity side. My problem comes with using it on the next.js [slug].js file. I have this error prompt out: This issue
Tag: graphql
Problems accessing data from a GraphQL query in Javascript with Svelte
Below I have my working function using a normal REST response that I want to try to convert into a GraphQL version, it fetches a JSON doc from my Phoenix Server and stores the object values from the JSON doc into an object. The problem is, here I can use await and then assign the new object values from the
Return multiple queries using Apollo
I am using nextJS for my frontend with apollo and a graphql. And I fetching my queries using the getStaticProps() function. To increase modularity and maintainability I break my queries into multiple queries. I have a folder structure like: src/queries getPost.js getMenu.js getProduct.js index.js And their all queries are put and exported into index.js. The problem is because of multiple
NestJs: Make sure your class is decorated with an appropriate decorator
I am using graphql-request as a GraphQL client to query a headless CMS to fetch stuff, modify and return to the original request/query. headless cms is hosted separately fyi. I have the following code : BlogPost is a model having the types : and FlatDateType has the following code it throws the following exception : Error: Cannot determine a GraphQL
expressGraphQL is not a function
I am learning GraphQL for my project using this tutorial: https://www.youtube.com/watch?v=ZQL7tL2S0oQ&ab_channel=WebDevSimplified and I get the error: I have already tried: this solution: graphqlHTTP is not a function – the program crashes all the same with {} parentheses and without them adding a semicolon after various lines The code for now looks like this: If I comment out this section: the
aws cdk nextjs graphql mutation cannot return null for non-nullable type after adding in new schema field
I have tried to modify the schema to add a ingredients String line. From this code I am pretty much following it to a tee https://github.com/dabit3/next.js-cdk-amplify-workshop you can look in the backend and frontend folders to see all the code I have built and deployed with cdk My error is at the bottom Any help would be great Here’s the
Passing Objects as Argument to GraphQL Mutation (graphql-request)
I have a very basic graphql mutation in the frontend that I send to my backend. I am using this code on the by graphql-request as a guide. With primitives it works: Now I’d like to also be able to mutate some meta data about the article, stored in a meta object inside the article: So my question is: How
GraphQL Error: Cannot return null for non-nullable field Mutation.deleteComment
I added a mutation to delete comments and whenever I try to delete a comment I get this error. Resolver Type definition Answer I found out that the issue was in importing errors from apollo-servers had to be in an alphabetical order.
How to declare array from API in place of hardcoded array?
I was given an example for some code that has an array hardcoded. Im looking to swap this out for my array that is pulled in from an API using graphql. Below is the code pen to the original example & another for what i’ve tried with no avail. I’m pretty new to graphql & js so likely an amateur
How to pass down props without duplicating fragments
I have parent component that ends up with nested fragments looking like this: Relay fails if I don’t include all this child fragments but the data is the same for all these, it seems pretty dumb having to declare a view fragment on all my child components that require the signed in user. How can I request this piece of