I have a unique endpoint that receives special files and automatically initiates a background task for uploading those files to our secure cloud storage system. In order to efficiently handle the file uploads in the background, we are utilizing advanced t ...
I am currently working with the following schema design: const articleSchema = new Schema<IArticle>({ title: { type: String, required: true, }, overview: { type: String, required: true, }, }); In order to compare the current ...
I am new to learning GraphQL with Typescript and I am trying to pass an argument in a GraphQL function to return something dynamically. I have been struggling with this issue for the past hour and could not find any solutions. Here are the relevant code sn ...
I have been pondering why updating data within the Apollo Client cache seems more challenging compared to similar libraries such as react-query. For instance, when dealing with a query involving pagination (offset and limit) and receiving an array of item ...
When utilizing the useRouter function with a parameter of type string, the following error is encountered: Type 'string | string[] | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type & ...
Recently, I encountered a challenging error after transferring a website from Google Cloud. Initially running on Nginx, the site is now hosted on an Apache server. The website comprises two parts: front-end (hosted on Vercel NextJS) and a backend WordPres ...
server: const { ApolloServer, gql } = require("apollo-server-express"); const express = require("express"); const mongoose = require("mongoose"); const { userResolvers } = require("./resolvers"); const { typeDefs } = ...
I am currently working with the Apollo Express Server version 2.0 and I am attempting to run a mutation in the GraphQL playground. Below is the mutation along with a screenshot of a variable: https://i.stack.imgur.com/rGGfu.png https://i.stack.imgur.com/V ...
I've encountered an issue while setting up the GraphiQL API. I keep receiving the error message "Cannot POST /graphql" on both the screen and network tab of the console. Despite having similar boilerplate code functioning in another project, I'm unable t ...
After trying all the suggested solutions on Stack Overflow and researching through previous questions, I have come here seeking help. I am using the latest version of NextJS (version 14) and encountering an issue with integrating GraphQL Apollo client into ...
I'm encountering an issue when trying to query specific fields in graphql/relay. My goal is to retrieve the "courseName" field for Courses from the schema provided below. For instance, if I query the User with: { user(id:1){firstname,lastname}} T ...
I am currently working on a Progressive Web App built with Next.js that needs to retrieve data from a Wordpress website, and I am still quite new to these technologies. These are the Wordpress plugins that I have installed: WPGraphQL WPGraphQL CORS WPGra ...
After executing the command: prisma deploy --env-file variables.env An error is displayed as shown below: https://i.stack.imgur.com/OrXrZ.png ...
I'm currently facing an issue that's giving me some trouble. In my datamodel.prisma, I added a new type called Challenge: type Challenge { id: ID! @id createdAt: DateTime! @createdAt updatedAt: DateTime! @updatedAt completed: Bo ...
Currently, I am delving deep into GraphQL and have defined two Object types. Let's see how they are structured: Firstly, The Book Type is outlined as follows: const BookType = new GraphQLObjectType({ name: 'Book', fields: () ...
Encountering an issue with my graphql query not returning anything when sending the _id as a string. Interestingly, querying the DB using any other stored key (like name: "Account 1") works perfectly and returns the object. I've defined my Account sch ...
Currently, I am in the process of developing a Next.js application that utilizes GraphQL with ApolloClient to manage API requests. Initially, I had success in setting up a page that functioned correctly and retrieved the appropriate data by passing an ID t ...
When it comes to developing GraphQL clients, fragment masking is often recommended as a best practice. However, I'm struggling to understand how to implement basic React functionalities with such complexity. A common necessity is providing key propert ...
Utilizing a GraphQL query in my React component to fetch data looks like this: const { data, error, loading } = useGetEmployeeQuery({ variables: { id: "a34c0d11-f51d-4a9b-ac7fd-bfb7cbffa" } }); When attempting to destructure the data, an error ...
Everything functions perfectly when backend mode is set to NODE_ENV: development, but in production mode I encounter an error with graphql-codegen: Error on local web server: Apollo Server does not allow GraphQL introspection, but the query contains _sc ...
// image.entity.ts import { Field, ObjectType } from '@nestjs/graphql'; import { Column, DeleteDateColumn, Entity, PrimaryGeneratedColumn, } from 'typeorm'; @ObjectType() @Entity() export class ImageEntity { @PrimaryGeneratedColumn('uuid') @F ...
Overview I am currently working with NestJS and @nestjs/graphql, using default eslint and prettier settings. However, I encountered some issues when creating a graphql resolver. Challenge Prettier is showing the following error: Replace returns with (r ...
After successfully adding a user to my database, I am encountering an issue where the query returns null in my client app even though it shows data in the GraphQL playground. To troubleshoot this problem, I have implemented a useEffect hook that triggers t ...
Currently, I am working with React Typescript and incorporating an Autocomplete Material UI component into my project. The main goal is to populate query suggestions within the Autocomplete component. The graphql queries are structured like this: Query D ...
Within the layout folder of my project, I have a Header component that includes a query to fetch some data. However, when I attempt to log this.props.data in the console, all I get is 'undefined'. Could someone please point out where I might be making a mi ...
Recently, I set up a GraphQL server in Go by following a tutorial closely. My front-end is developed using Next.js and I'm currently working on creating a client to connect to the server. Despite referring to the subscription docs thoroughly, I can&ap ...
Encountering issues setting up refetchQueries with reason-apollo. Following a setup similar to the swapi example here, I have a listing and a form for adding new items via a mutation. Upon successful mutation, the goal is to refetch the items in the listin ...
I am currently facing an issue with executing a GraphQL request that includes variables using the apollo-boost client on a Flask + Flask-GraphQL + Graphene server. let data = await client.query({ query: gql`{ addItemToReceipt(receiptId: $receiptId, ...
My data consists of a set of interconnected items like this: book { id ... related_entity { id ... } } Once Apollo caches it, there are two separate cache objects. The related_entity field on book points to an EntityNode object. Everything ...
Encountering issues with the prisma deploy command where 'graphql' is not being recognized as a valid command. I've attempted various solutions, including modifying the PATH variableas evident here. Additionally, I have verified both global ...
Currently using Apollo-Server/TypeScript with graphql-tool's makeExecutableSchema() to set up schema/directives. Encountering an error while attempting to add a basic GraphQL Directive: TypeError: Class constructor SchemaDirectiveVisitor cannot be in ...
Currently, I am diving into the realm of web development with MongoDB, express, react, node and GraphQL. While researching extensively, there is one concept that I'm struggling to fully grasp. The application I am working on is essentially a recipe app whe ...
import { graphql } from 'gatsby'; const Footer = ({phone}: { phone?: Queries.FooterFragment['phone'];}): JSX.Element => { return <footer>{phone}</footer>; }; export default Footer export const query = graphql` fragm ...
Struggling to make this work as expected. After some research, I discovered that nextjs/ssr has compatibility issues with subscriptions and it's important to verify the existence of process.browser. However, I am facing challenges in integrating my authLin ...
Ever since I updated to NextJS 13.5, I've been encountering these errors specifically when deploying on Vercel (although everything works fine locally): Error: Schema must contain uniquely named types but contains multiple types named "h". at new GraphQL ...
When attempting to run the setup, I encountered the following error: npm run setup **Sequelize CLI [Node: 12.14.1, CLI: 5.5.1, ORM: 5.21.6] Loaded configuration file "src\config\database.json". Using environment "development" ...
I am currently working on an ecommerce website for a personal project and I am struggling with setting up the place order functionality. After inputting the data, I want to retrieve the Id and redirect it to orders/[id]. Check out my code below: import Re ...
After successfully implementing a schema and resolvers for my Express server, I tested them through /graphql. Now, I am looking to utilize the queries from a REST API by calling them in GET handlers like this: //[...] //schema and root are properly implem ...
I decided to replicate reddit using Next.js and incorporating stepzen for graphql integration. I have successfully directed it to a specific page based on the slug, but unfortunately, I am facing an issue with retrieving the post information. import { use ...
Hello, I am fairly new to the world of programming with react/javascript/node. Currently, I am working on a project using Shopify CLI and have generated a boilerplate app utilizing react/next.js/apollo. I am uncertain if my current approach aligns with wh ...
Starting my Gatsby journey and experimenting with the gatsby-source-pg plugin. Encountering issues with different graphql versions. Reached out to the plugin author on GitHub for assistance, and they were extremely helpful in addressing my concerns. Howev ...
I'm struggling to pass a refetch function from a useQuery() hook into a context in order to call it within the context. I've been facing issues with type mismatches, and sometimes the app crashes with an error saying that refetch() is not a function. My g ...
I am trying to establish a connection between Users, Posts, and Comments by linking them together. However, I keep encountering an unexpected error: ID cannot represent value: <Buffer 5e 9b f1 3e e9 49 61 38 fc 1a 6f 59> Here is my code. If you ca ...
Within my organization, we utilize an application that utilizes React, express, Apollo Server, and Apollo Client to showcase data from various sources. This app regularly updates the displayed data using a polling method. However, whenever I make code upda ...
I'm currently delving into TypeGraphQL and working on building a basic resolver. My code snippet is as follows: @Resolver() class HelloReslover { @Query(() => String) async hello(){ return "hello wtold" } } However, ...
In my project, I have organized my GraphQL operations into two separate files: mutations.js and queries.js, which are stored in a directory named gql... The gql folder serves as a repository for GraphQL mutations and queries that are utilized throughout t ...
Here is my approach to querying data from a Graphql engine. export GraphQLWrap <TData, TParam = {}>({ query, extractData, children, queryVariables, skip, }: AsyncWrapProps<TData, TParam>) => { return ( <ApolloConsumer> ...
https://i.stack.imgur.com/GPmVm.pngI'm currently setting up a GraphQL Schema using Express, but I'm facing an issue where Graphiql is not recognizing the schema. When I execute a query, it prompts me to provide a query string. Below is my code. Can anyone ...
I am attempting to establish a GraphQL connection from my React app. Here is my index.js: import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import { ApolloProvider } from '@apollo/clien ...
I have successfully set up a dynamic route for a statically generated page component (I hope that's correct?) which functions perfectly in development mode. I am able to create pages in my headless CMS (KeystoneJS) and view them on my local environmen ...
I currently have a functioning query available const getUniqueCicadaByUserIdQuery = gql` query($id:String){ user(id:$id){ id userName password cicadas { name id image long lat userid ...
Currently, I'm in the process of creating a blog using next.js with sanity.io platform. However, I am facing some difficulties when it comes to utilizing the code-input plugin. What's working: I have successfully implemented the code component block on sa ...
When working with the Lighthouse package for GraphQL in Laravel, I have a model named "ClassA" that needs a type declaration as "TypeA". What is the recommended best practice to achieve this? ...
I've been trying to obtain a cookie while working with the nestjs and graphql technologies. However, I encountered an issue when it came to validating the cookies by implementing graphql on the module and creating a UseGuard. It was suggested that I could ...
Given a unique GraphQL union return type: union GetUserProfileOrDatabaseInfo = UserProfile | DatabaseInfo meant to be returned by a specific resolver: type Query { getUserData: GetUserProfileOrDatabaseInfo! } I am encountering warnings and errors rel ...
Utilizing Apollo, I aim to fetch multiple items upon a user clicking a button. The backend data may not be immediately available, so I opt for polling to eventually retrieve the results. To achieve this, I iterate through the items in a loop and make quer ...
Recently, I have been working on implementing graphql.net using conventions. The model that I am working with is defined as follows: public partial class Project { public Project() { ProjectGroup = new HashSet<ProjectGr ...
Having trouble with v-for and iterating through nested objects in Nuxtjs, Strapi, and GraphQL Received this object from GraphQL: "fotografies": { "data": [ { "id": "1", "attributes&qu ...
Is there a way to implement conditional usage of graphql so that it returns an Account when provided with an address, and returns the authenticated user when no address is given? accountByAddress(address: String! @where(operator: "like")): [Account!]! @a ...
Currently, I am in the process of optimizing key features within my Node.js API which incorporates GraphQL. This API serves as a proxy, receiving requests from various sources and forwarding them to multiple APIs based on the request. I am interested in ...
After running a query and rendering items via the UserList component, I use a button in the UserList to run a mutation for deleting an item. The components are linked, so passing the deleteContact function and using refetch() within it ensures that when a ...
Question: I am facing an issue with querying user information when entering a specific user page like website/user/1. However, I keep encountering errors and suspect it might be related to Apollo. Is there a way to resolve this problem? What could I have d ...
Seeking assistance as I may have overlooked a step. Any guidance is appreciated! Recently, I managed to deploy a full-stack serverless nextJs application on AWS Amplify successfully. I made modifications by adding a new field while creating a new blog pos ...
Currently, I am in the process of integrating graphql into my Vue project by following the guidance provided at https://github.com/Akryum/vue-apollo Although I have successfully installed 'apollo-client' via npm as per the requirements, I am encountering ...
I'm currently facing an issue while attempting to execute a POST request using a GraphQL query. The error message Must provide query string keeps appearing, even though the same request is functioning correctly in PostMan. This is how I have configured it ...
I have implemented GraphQL MongoDB Mongoose in my project, where I have defined 2 collections - users and categories. Category.js const mongoose = require('mongoose'); const Schema = mongoose.Schema; const categorySchema = new mongoose.Schema({ title ...
I'm encountering an error message while using nexus to define a graphql schema with apollo-server. Error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type The stack trace doesn't provide much insight into where the problem is occ ...
My mongo schema for todo items looks like this: const todoSchema = new Schema( { userId: { type: String, required: true }, title: { type: String, required: true }, due_date: { date: { type: Number }, month: { type: Number }, ...
Every time I attempt to send a data query in GraphQL, I receive a bad request code. I am unsure whether the problem lies with the resolver or the input itself. https://i.stack.imgur.com/6WKMD.png Here is the resolver function: const addTranslationTableAd ...
Recently, I set up an ExpressJS server for Server-Side Rendering (SSR) with Apollo GraphQL. However, I encountered a problem: Although the initial page source is as expected once the server starts running, the data fetched by GraphQL remains static and nev ...
In my current project, I am exploring the capabilities of the Camunda platform. Specifically, I am developing a React application that interacts with a GraphQL API to perform certain actions. After successfully testing the API using Postman, I have identif ...
Currently, I am utilizing the artillery node JS tool for performance testing using yml-based scenarios. All necessary plugin libraries have been successfully installed and I can execute artillery tests without an issue. However, I am encountering a problem ...
I am facing an issue with my code where the cookieData is rendered as undefined on the initial render and query, causing the query to fail authentication. Is there a way to ensure that the query waits for the response from the cookie API before running? co ...
I recently launched a website on AWS Amplify Hosting with the front-end built using Next.js. The backend is powered by AWS App Sync and DynamoDB, utilizing the API Category in Amplify. Interestingly, I have set caching to None in the AppSync API. One of t ...
I'm encountering issues while trying to incorporate a function generator within a GraphQL mutation. The function generator is utilized to streamline the promise chain inside the mutation. Prior to refactoring the code, everything was functioning corr ...