gatsby-image-background using v3 gatsby-image

I am trying to make gatsby-background-image work with v3 of gatsby-plugin-image. I have followed documentation and found I should be using gbimage-bridge. For some reason it doesn’t seem to work. My …

Send data between components in ReactJs using Apollo Client

According to the documentation, GraphQl provides state management like Redux. I have 2 components. In the Component1 i get data from the server using AppoloClient, it works ok, and in the Component2 i …

add block-input from sanity.io to next.js blog post

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: …

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: TypeError: expressGraphQL is not a function …

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 &…

How to pass down props without duplicating fragments

I have parent component that ends up with nested fragments looking like this: query MyAppQuery( $id $a $b $c ) { viewer { …App_viewer …ComponentA_viewer @include(if:…

How do I eliminate all these if-else

I have written this code to filter a “books” array, depending on the author or genre have been given as a parameter:- //This code works perfectly fine as is allBooks: (root, args) => { …

Target specific folder with Gatsby and allImageSharp context

I’m a beginner on Gatsby. I try to display a batch of images in grid from a specific folder. I find a script to do that, but that’s catch all pics from my data folder and my purpose is target a …

graphql resolver return Cannot return null for non-nullable field from asynchronous function in nodejs

Don’t get me wrong I have been forced to use waterfall because I need to execute one function after another. There is no problem related to the schema or return type just stuck with asynchronous …

Nested Query GraphQl

I am new using graphql and I would like to know how could I filter my query to get the recipes that has some of the ingredient objects I have in my input array. this is the schema.gql file type Recipe …