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
2
votes
2 answers

Making update request using graphql

I am trying to make crud application using graphql. But I am not sure about update request. I tried, but it's not working. Here see my code. Create post and query posts are working fine. I am using express and express-graphql. I tried going through…
aditya kumar
  • 2,905
  • 10
  • 39
  • 79
2
votes
1 answer

Refetch queries in react-native with graphql

I'm beginner and i try to learn graphql. I want to create an app which update the data(realtime) from react web app to react native mobile app with graphql. In the web app was easy to refetch query when i pressed the OK button. In the mobile app i…
2
votes
0 answers

Graphql Authorization not send

I have a graphql server, what is working with jwt auth. The problem: The playground sometimes sends the Authorization header, sometimes not. Not sends: on the AWS server. Sends: Localy. If im hitting the aws server with postman it also works, but…
Peter
  • 1,280
  • 8
  • 15
2
votes
1 answer

Context not being passed to nested Apollo GraphQL resolver

I am using Apollo Server v2 for my project I have added auth like given here https://www.apollographql.com/docs/apollo-server/features/authentication/ I wanted to include nested resolver in my Query and Mutation so I did as per…
Ashniu123
  • 347
  • 4
  • 13
2
votes
1 answer

serving images with graphql

I have graphql server built by express-graphql and I use mongoDb to store images in normal database collection since they are < 16MB. I have react and android app. What is the best way to serve these images to the clients. In my schema I have…
Nux
  • 5,890
  • 13
  • 48
  • 74
2
votes
1 answer

Cast to number failed for value - GraphQL

I'm new to graphQL. I'm trying to play with graphiql and I'm trying to perform a where Where I want to retrive the authors with age greater than 30. resolver.js Query: { authorGratherThan: (root, { age }) => { return…
Patricio Vargas
  • 5,236
  • 11
  • 49
  • 100
2
votes
1 answer

Social authentication in GraphQL

I am creating a backend which relies in Express and GraphQL which will serve clients apps (android and react). I have been following this article on how to nail social authentication in GraphQL using passport.js. The article uses…
Nux
  • 5,890
  • 13
  • 48
  • 74
2
votes
0 answers

subscriptionsClient.subscribe is not a function

At this instance i am just trying to run a dummy subscription using graphql-subscriptions, and later-on, integrate it in my code. However, even with the minimal example. I am following a scotch.io example, here is its git…
2
votes
1 answer

express-graphql - subroutes matching parent route

So I have the following routes: /creator/item and /creator/item/price. Both the schemas of the two routes have a mutation called updateOne. However, when I call the route of /creator/item/price it matches /creator/item instead. Is this intended? Is…
A. L
  • 11,695
  • 23
  • 85
  • 163
2
votes
1 answer

express-jwt and express-graphql: error TS2339: Property 'user' does not exist on type 'Request'

I try to make express-jwt and graphql work together in typescript. import * as express from 'express' import * as expressGraphql from 'express-graphql' import * as expressJwt from 'express-jwt' import schema from './api/schemas' import rootValue…
François Romain
  • 13,617
  • 17
  • 89
  • 123
2
votes
1 answer

GraphQL query returning null

I ran this successful mutation which was saved to my MongoDB database: mutation { addRecipe(name: "Chole Dhania Masala", category: "Indian", description: "A tasty dish", instructions: "Cook it") { name category description …
Daniel
  • 14,004
  • 16
  • 96
  • 156
2
votes
1 answer

GCloud AppEngine nodejs application returns 404 on first requests but subsequent ones are successful

I am deploying a nodejs server (graphql) application on GCloud AppEngine standard environment and occasionally the first requests fail but the subsequent ones (within 5s) work . I am using the following configuration: runtime:…
2
votes
3 answers

GraphQL Node.js: determine what types are used within a query

Given I have a schema that has types: User, Comment, Post, Image; Is it possible to determine the GraphQL types being used in a query, given the query and schema? e.g. if a client had a query { user(userName: "username") { email …
2
votes
1 answer

How to receive an array as member of an input parameter of a GraphQL service?

Given this schema: input TodoInput { id: String title: String } input SaveInput { nodes: [TodoInput] } type SavePayload { message: String! } type Mutation { save(input: SaveInput): SavePayload } Given this resolver: type TodoInput = { …
Saulo
  • 499
  • 1
  • 4
  • 16
2
votes
1 answer

graphql JS returns null when i send a query via graphiql

I think I have thoroughly checked this code but can't find the error please help!! I get a null return when I query id also, vscode tells me my parent in the resolve function is not used. What am I doing wrong here?? express --- const express =…
Prof3ssa
  • 23
  • 5