Skip to content
Advertisement

Tag: graphql

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

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

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

Advertisement