0 There is code with GraphQL in bff and in the application part. This function is described as follows: shema.js: type Mutation { deleteCart(id: Int): [Cart] } index.js: deleteCart: (_, args) => { carts = carts.filter((c) => c.id !== args.id); return carts; } As declared in query: export const CART_ITEMS = gql` mutation DeleteCart ($id: […]
0 I’m using API Platform and I want to add graphQL support and keep the same behavior between my REST calls and my graphQL calls. I have some custom filters for my get collection that works fine with REST, but they are not recognized in graphQL. According to the doc, I’ve added the following so […]
0 I’m using @apollo/datasource-rest to wrap a 3rd party API. The endpoint I’m trying to hit checks if an email is already in use or not. If the email is in use the response looks like this "body": "True", "statusCode": 200, "contentType": "application/json", If the email is not in use the api returns a 404 […]
1 I hope you are doing well! We are using web sockets in our website with graphQL hence we are using useSubscription. It is working fine, I get the data back when I need it; however, we are facing a small issue that while it is not stopping our website from functioning, it is extremely […]
0 I’m trying to amplify push my updated amplify/backend/api/<myAPIName>/schema.graphql file. I am getting the following error: An error occurred during the push operation: / Schema validation failed. Expected type String, found ["Admins", "Users"]. canRead: [String] @default(value: ["Admins", "Users"]) Expected type String, found ["Admins", "Users"]. The offending code in schema.graphql: type Card { … canRead: [String] […]
0 I am using graphql-request to execute a mutation in an onClick handler in a react application The mutation executes successfully (I can verify by looking at the logs in the backend). The code in onClick handler (loginHandler) following the gqlClient.request never executes (console.log or alert) here is the code, any idea what am I […]
0 Example: I receive data in a string that needs to be parsed first, for example an IoT message. I can create a mutation for that no problem, I’m just storing a string in a DB, however, based on what was in the string, I then save data of very different types, so I will […]
1 I am creating an apollo server v4 gql gateway with the express.js integration. I have user typedefs and user resolvers working and creating a jwt when a user is created. I then try to use my jwtMiddleware middleware on the /graphql endpoint so that it can validate a bearer token is being passed in […]
1 Im working an app using react for the frontend and apollo/client and graphql. It works perfectly on the localhost, but when I deploy to heroku it only works if I also have the app running on the localhost. Here is what I have for the uri. const client = new ApolloClient({ uri: ‘https://localhost:5000/graphql’, cache: […]
0 I currently have an existing Micronaut server project that containing multiple endpoints. I’m considering incorporating an additional GraphQL endpoint and introducing management endpoints for a new feature. However, whenever I add one of these dependencies (micronaut-graphql or micronaut-management), the software fails to start and consistently generates the following error message: ←[36m13:12:08.804←[0;39m ←[1;30m[main]←[0;39m ←[1;31mERROR←[0;39m ←[35mio.micronaut.runtime.Micronaut←[0;39m […]