Questions tagged [express-graphql]

GraphQL HTTP Server Middleware

Create a GraphQL HTTP server with any HTTP web framework that supports connect styled middleware, including Connect itself, Express and Restify.

386 questions
0
votes
1 answer

Can we return a string or object in grapqhl while resolving?

I wanted to check whether the user exists in database ... if user exists in the database then send type user{ name email password username } or if user doesn't exist in database then send a string which tells "user doesn't exists in…
Mark ellon
  • 109
  • 6
0
votes
0 answers

Nodejs server getting latent when any of the backend dependent service gets latent

Our infra for web application looks like this Nodejs Web application -> GraphQL + Nodejs as middleware (BE for FE) -> Lot's of BE services in ROR -> DB/ES etc etc We have witness the whole middleware layer of GrpahQL+Nodejs gets latent whenever any…
Nitin Agrawal
  • 1,341
  • 1
  • 10
  • 19
0
votes
1 answer

Getting the infamous 400 error from graphql when uploading a file, debug shows data populated in graphql-upload

I know this is a common issues, and I've made sure the app is sending the right data. I've even added logging to show that the fields are being populated correctly. The one thing I noticed is the console.log I have inside parser.once('finish' () =>…
Vince
  • 757
  • 1
  • 8
  • 16
0
votes
1 answer

How to handle Uncaught Error: Objects are not valid as a React child error

What is the best way to handle the user input errors returned from GraphQL resolver? I am trying to code user singup using react and graphql. I would like to user errors like email is taken or some other validation message on the form. Currently I…
Ben Jonson
  • 565
  • 7
  • 22
0
votes
0 answers

Graphql arguments returns {} when using variables

I just want to test my query mutation with Postman. Here is my query mutation ($input: registerSupplierInput){ registerSupplier(input: $input){ message success } } And variables: {"email":"1@d.com", "name":"1",…
0
votes
1 answer

Prisma 2 DateTime field used in a node express-graphql application

I can't seem to find how to manage DateTime field in prisma 2 to node express-graphql app. If I set the field type to string in graphql.schema it just changes the value to fit the 32 bit representation. What are the options? I insert the datetime…
Dreamystify
  • 125
  • 13
0
votes
1 answer

GraphQL implement "not permitted"

I have a GraphQL API that is governed by a permission system that I implemented. I tried going with Graphql-shield but I didn't want to error out on the whole request if the client requests a forbidden field, so instead I implemented my own…
0
votes
1 answer

Relay Modern BadRequestError: Missing multipart field ‘operations’

I am trying to upload file to my server. using Altair i can do it without any error but when i use Relay.js for uploading it server throws following error. BadRequestError: Missing multipart field ‘operations’…
Rekha
  • 21
  • 2
0
votes
1 answer

Gatsby Create Pages

I am trying to create a gatsby site where I have projects posted, each with tags. I followed a basic tutorial on creating a gatsby blog, and am now working through gatsby's tags as documented on their website. Along the way while changing variable…
Jakob Palmer
  • 31
  • 1
  • 3
0
votes
1 answer

Graphql query is always returning null

I am trying to get course data using graphql, but server is always returning null as a response This is my code in file server.js : var express=require('express'); const { graphqlHTTP } = require('express-graphql') var…
HardRock
  • 809
  • 2
  • 12
  • 37
0
votes
2 answers

Alias object in graphql,

I know if my data is coming like { id: 123 address: xyz name: hello } and I want to alias name during Query I can do it like query { identification: id address full_name : name } So my data will look like this: { identification: 123 …
xoxocoder
  • 294
  • 3
  • 15
0
votes
1 answer

User data not returning anything from query call

I'm not sure which part I might be doing wrong. I was hoping to get some advice. The query I am using in GraphiQL is: query getUser($id:Int!) { user(id:$id) { id email } } For the backend I am using NodeJS. I am also declaring the…
Yama
  • 401
  • 1
  • 8
  • 22
0
votes
0 answers

Setting cookies on Graphql-yoga server throws a CORS error but it isn't

Edit: It definitely isn't actually CORS. It is like it is just ignoring my attempts to write the tokens into cookies... I am also having trouble getting it to throw an error that I can find useful... I will keep throwing darts at the wall until one…
Jordan Rhea
  • 1,186
  • 15
  • 34
0
votes
1 answer

Getting error {"errors":[{"message":"Must provide query string."}]}

I have this in my app.js const express = require('express'); const bodyParser = require('body-parser'); const graphqlHttp = require('express-graphql').graphqlHTTP; const { buildSchema } = require('graphql'); const app =…
louisssee
  • 15
  • 1
  • 5
0
votes
1 answer

How to handle error using apollo client in angular for graphql?

Below is my code . I have been trying to somehow link the error variable to GraphQL Module . Kindly provide a way to achieve that . import { ApolloModule, APOLLO_OPTIONS } from 'apollo-angular'; import { HttpLinkModule, HttpLink } from…