0 //Sever.js import { ApolloServer } from ‘@apollo/server’; import { startStandaloneServer } from ‘@apollo/server/standalone’; import {makeExecutableSchema} from "@graphql-tools/schema"; import {typeDefs, resolvers} from "./schema.js"; import { expressMiddleware } from ‘@apollo/server/express4’; import { ApolloServerPluginDrainHttpServer } from ‘@apollo/server/plugin/drainHttpServer’; import express from ‘express’; import http from ‘http’; import cors from ‘cors’; import bodyParser from ‘body-parser’; async function startServer(port, callback){ […]
0 I have developed a NestJs graphql app and now I want to authorize all my mutations and queries. Users get authenticated from Auth0. after following this article I have created below files in my project. AuthModule : import { Module } from ‘@nestjs/common’; import { PassportModule } from ‘@nestjs/passport’; import { JwtStrategy } from […]
0 i upgraded to apollo 4 and i am using koa js. But there are some problems with context. Authentication process does not work. Authentication time I get an error like this: **"message": "Cannot read properties of undefined (reading ‘headers’)" "code": "INTERNAL_SERVER_ERROR", @[email protected][email protected]/node_modules/@apollo/server/dist/esm/utils/schemaInstrumentation.js:36:28) backend/graphql/resolvers/posts.js:31:20 backend/util/check-auth.js:5:36** import { ApolloServer } from "@apollo/server"; import { ApolloServerPluginDrainHttpServer } […]
0 I have Autodesk Construction Cloud Subscribed account, But still I’m unable to get all hubs using graphQL Query. I am getting the fusion 360 hubs but not ACC hubs. Is there any other way to get all hubs from ACC account? I have tried following query to get all the hubs of ACC. query […]
1 I am currently building an AppSync API and after doing some research into how to load four different fields with two data sources (two fields per data source) I came across this question. The response to this question seems to do a great job explaining the use of data loaders and using mostly field […]
4 I’m trying to initialize an instance of DataLoader using the following code: const authorLoader = new DataLoader(async (keys:string[]) => { // Return an author for each book }); I’m getting the following error: Argument of type ‘(keys: string[]) => Promise<Author[]>’ is not assignable to parameter of type ‘BatchLoadFn<string, Author>’. Types of parameters ‘keys’ and […]
0 I’m using Nest.js + GraphQl + Prisma, and trying to create 3 tables: User, Post, and Viewers When getting 1 post I need to add the user as viewer. Successfully saving it to the db but when returning the relationship, viewers is constantly null Here’s my prisma schema: model User { id Int @id […]