Tag: nestjs
-
Nestjs: No type definitions were found with the specified file name patterns: “./**/*.graphql”
0 im trying to deploy Nestjs with Graphql backend server on Vercel, I am using schema first approach so there is a schema.graphql and graphql.ts in my src folder, you can see my code below, im following the nestjs docs to write my code, but it shows this error when deployed, can anyone help to…
-
How to specify auto-generated types by Prisma for the code-first Graphql resolver on NestJS?
0 Suppose I want to execute a many-to-many mutation like below, which is cited from prisma.io: const createCategory = await prisma.post.create({ data: { title: ‘How to be Bob’, categories: { create: [ { assignedBy: ‘Bob’, assignedAt: new Date(), category: { create: { name: ‘New category’, }, }, }, ], }, }, }) To implement Graphql…
-
GraphQLError: Query root type must be provided
37 I’m using NestJS, TypeORM and GraphQL for my backend API. I’m getting the following error: GraphQLError [Object]: Query root type must be provided. at SchemaValidationContext.reportError (/home/wise-introvert/Container/Projects/the-notebook/app/server/node_modules/graphql/type/validate.js:88:19) at validateRootTypes (/home/wise-introvert/Container/Projects/the-notebook/app/server/node_modules/graphql/type/validate.js:107:13) at validateSchema (/home/wise-introvert/Container/Projects/the-notebook/app/server/node_modules/graphql/type/validate.js:52:3) at graphqlImpl (/home/wise-introvert/Container/Projects/the-notebook/app/server/node_modules/graphql/graphql.js:79:62) at /home/wise-introvert/Container/Projects/the-notebook/app/server/node_modules/graphql/graphql.js:28:59 at new Promise (<anonymous>) at Object.graphql (/home/wise-introvert/Container/Projects/the-notebook/app/server/node_modules/graphql/graphql.js:26:10) at GraphQLSchemaFactory.<anonymous> (/home/wise-introvert/Container/Projects/the-notebook/app/server/node_modules/@nestjs/graphql/dist/schema-builder/graphql-schema.factory.js:49:52) at Generator.next (<anonymous>) at /home/wise-introvert/Container/Projects/the-notebook/app/server/node_modules/tslib/tslib.js:114:75 This is…
-
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…
-
Front End Development Lead – IT Minds LLC – Remote
IT Minds LLC Remote Depends on Experience Accepts corp to corp applications, Contract: Independent, W2, 12 Month(s) Skills Front End Development GraphQL Javascript Reactjs Nodejs Nestjs Nextjs Job Description Position: Development Lead Duration: Long Term Location: Remote Deliver Innovative technology solutions to complex problems with client-centric approach Improve current capabilities, process and resources Innovation in…
-
NestJS + Graphql generate type file into the source shcme folder, not src directionary
0 I use NestJS with Graphql, and want to genrate type file with the schema. generate type code import { GraphQLDefinitionsFactory } from ‘@nestjs/graphql’; import { join } from ‘path’; const definitionsFactory = new GraphQLDefinitionsFactory(); definitionsFactory.generate({ typePaths: [‘./src/**/*.graphql’], path: join(process.cwd(), ‘src/**/*.ts’), outputAs: ‘class’, watch: true, emitTypenameField: true, }); above code generate graphql.ts, but i want…
-
How to declare Array Of Objects in TypeORM Graphql Schema?
0 I am working with 2 Postgres Models – users and posts, where each user can have multiple posts (One to Many Relation). Here I need to make a user profile function to access data of single user along with the associated posts. I have made the following schema.ts file for the same – import…
-
Should I use REST or GraphQL for file upload?
0 I have a GraphQL API, but I have doubts about whether to file upload in a graphql mutation or do it in a REST endpoint, I know that it can be done in both ways. I have read that for file uploading the ideal is to have a REST endpoint instead of a mutation.…
-
What is [Symbol(kHeaders)] and how do I parse it as headers
2 I am having trouble parsing the header retrieved from graphql’s context, what I would like to do is to basically forward the headers from the request into the response My gateway: GraphQLModule.forRootAsync<ApolloGatewayDriverConfig>({ driver: ApolloGatewayDriver, inject: [ConfigService], useFactory: async(configService: ConfigService) => ({ server: { introspection: true, playground: true, cache: ‘bounded’ }, gateway: { buildService: (url)…