Tag: apollo-server
-
GraphQL Mutation Query Not working in Apollo Server
0 helpppp, I am making a movie website using Tmdb api built with Nestjs and Graphql as the backend, I wanted to make a patch request that users can upload their ratings for each of the movies, here is the link to the docs for more details: https://developer.themoviedb.org/reference/movie-add-rating, I am using schema first approach with…
-
Impossible to use @graphql-codegen/cli correctly, Error: Cannot find module ‘stream/web’
0 I have some problems using graphql-codegen. Here’s the best description I can give, hope it helps with the resolution. My work environment: Windows 10 Non-admin user NodeJS 16.0.0 NPM 7.24.2 Typescript 5.2.2 Apollo server express 3.12.1 GraphQL 15.8.0 The error is obtained when (according to the documentation) I init with this command: npx graphql-code-generator…
-
GraphQL Neo4J query that filters by date doesn’t return any data when it should
0 I’ve been trying to get my head around this issue for a couple of days but I seem to be unable to find a solution. I’m working on a GraphQL backend that uses Apollo and Neo4j. I’ve got a type similar to this one: type Data { ID: ID! @id(autogenerate: true, unique: true) data:…
-
“Mime type of document could not be determined” Error on Apollo Server
0 I was given a link for a graphQL server with already built in queries and mutations. When I tried to run a mutation, I got the following response: { "data": {}, "errors": [ { "message": "Mime type of document could not be determined" } ] } What could be the problem and how can…
-
How to access request in prisma middleware
0 I am using typegraphql-prisma and all the resolver are autogenerated. I need to automatically set the createdBy and updatedBy fields in Prisma models based on the authenticated user’s ID, which retrieve from a Firebase token in Express middleware. //auth.middleware.ts import { Response, NextFunction } from "express"; import * as admin from "firebase-admin"; import {…
-
Duplicate “graphql” modules cannot be used at the same time since different versions may have different capabilities and behaviour
0 `Currently i am facing the problem during the migration of the Apollo server from version 2 to version 4 We are downloading and implementing changes in lot of packages mainly when it comes to the Graphql package i have downloaded all the components and installed in my machine but some packages says that duplicate…
-
Apollo4 and GraphQL CORS
-1 I’m trying to access my graphQL server on my production server but getting the CORS error. The request url is: https://mov****.at/graphql In my index.mjs where I start the Apollo server I have CORS defined as so: app.use( ‘/graphql’, cors({ origin: [‘https://mov***.at’, ‘https://mov***.at/graphql’, ‘https://studio.apollographql.com’] }), bodyParser.json(), expressMiddleware(server), ); And in my graphql.module.ts I have the…
-
String cannot represent value: { success: false, status_code: 34, status_message: “The resource you requested could not be found. } GraphQL Error
0 Anyone please helppppp!!! I am trying to use TMDB movie api to post a rating, check out the link here for their docs:https://developer.themoviedb.org/reference/movie-add-rating, however i face an issue that it keeps showing me the below error when i implement to Graphql code for Mutation, how do i solve it: "errors": [ { "message": "String…
-
Physical Storage of InMemory Cache of Apollo Client
0 According to Apollo Client docs, the InMemory cache is used in the apollo client cache as instantiated in the below code import { InMemoryCache, ApolloClient } from ‘@apollo/client’; const client = new ApolloClient({ // …other arguments… cache: new InMemoryCache(options) }); Reference: https://www.apollographql.com/docs/react/caching/cache-configuration/ Where is this in-memory storage physically created? Is it in sessionStorage or…
-
FetchError: invalid json response body GraphQL
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…