Tag: Node.Js
-
Code splitting GraphQL types causing issues on require
0 I’m going through a graphql & node tutorial and I’m trying to do a bit of code splitting on the various aspects of the repo, splitting the Types, mock data and schema out into their own respective directories. It seems that the schema and the mock data are playing ball, but the types are…
-
How to apply alias in @key field in apollo federation
0 type oPlayer @key(fields: "id") @key(fields: "name"){ id:ID name: String } extend type oPlayer @key(fields: "name") @key(fields: "PlayerId") { name: String @external PlayerId: ID @external } I am tring to resolve that field using PlayerId field with id but I am not able get data in referance resolver How to provide alias to "PlayerId:id" so…
-
why i can’t connect with my api , the header of requset is (blocked by cors) nodejs
0 I want to return data from my graphql API, I have two front-end in one of these is work, but in another front-end, it doesn’t work when I run the first front end in this port it works but for the second one to doesn’t work and it says blocked by cors policy hare…
-
Looking for a guide to access AWS Appsync Graphql api from NodeJS app via http request
-1 There is currently, to my knowledge, no one guide that walks through this process so I’d like to find one that can be extended upon and commented on by others who may have extra security "best practices" and the likes to contribute. node.js graphql amazon-iam aws-amplify aws-appsync Share Improve this question Follow edited Aug…
-
Remove all items in table with Prisma2 and Jest
2 I would like to know how can I remove all items in table with Prisma2 and Jest ? I read the CRUD documentation and I try with this : user.test.js …. import { PrismaClient } from "@prisma/client" beforeEach(async () => { const prisma = new PrismaClient() await prisma.user.deleteMany({}) }) … But I have an…
-
Apollo-server hide graphql ui in production
1 I’ve been searching for an explanation of this. The question is kind of "basic" so I was hopping to find the solution quickly, but I haven’t. I want to hide the graphical ui in production server so anyone can’t see my queries, but I can’t. I don’t have problems to figure it out how…
-
How to accept POST request from a remote server on a GraphQL Server
0 I am working on a project currently using GrapQL. I am integrating a payment processor, when the user payment is successful, the payment processor sends a POST request to the webhook URL that is meant to point to my server. Now I was wondering how to achieve this, considering that GraphQL exposes just one…
-
How to disable graphql playground?
0 My angular application is configured with graphql which by default enabled with playground, how to disable it? following is my package.json "dependencies": { "@nestjs/common": "^7.0.8", "@nestjs/core": "^7.0.8", "@nestjs/graphql": "^7.3.4", "@nestjs/microservices": "^7.0.8", "class-transformer": "^0.2.3", "class-validator": "^0.12.2", "graphql": "^14.0.0", "reflect-metadata": "^0.1.12", "rxjs": "^6.0.0" } and Dockerfile FROM node:16 RUN mkdir -p /testappservice/app COPY dist/apps/testappservice-container testappservice/app COPY…
-
Regarding dynamic field selection in apollo-server
0 I’m using apollo GraphQL for backend and frontend. I want to dynamically select fields which are requested by the client. With the help of info argument I created a function which gives me selected fields by client and based on that I fetch selected fields from db. Resolver selection.fields = .extractSelection(info?.fieldNodes[0]?.selectionSet) function implementation .extractSelection…
-
Regarding dynamic field selection in apollo srever
0 i am using apollo GraphQL for backend and frontend . i want to do dynamic selection of fields which is selected by client . so with the help of info argument i get i created a function which give me selected fields by client based on that i fetched selected fields from db. here…