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

Why I'm getting the error "Must provide query string." express-graphql?

I'm beginning with graphql on express. I'm getting the error "Must provide query string." when I access to the route for it. It's an express app. Here is my app.js var createError = require('http-errors'); var express =…
Yoedusvany Hdez
  • 415
  • 2
  • 5
  • 15
0
votes
1 answer

The graphiql mutation request succeeds but returns null

When I do a mutation on graphiql which is using my code for the GraphQL server, it returns null for all entries in the object. I am using a Node and Express back end and it is using a MongoDB database that uses mongoose to access it. updateTodo: { …
0
votes
1 answer

How to get the Populated values of a model in GraphqQL list without _id reference?

I have a Users model with some fields and reference to "Skills" model. The models are look like this below 1.Users.js (users model) const mongoose = require('mongoose'); const Schema = mongoose.Schema; const UsersSchema = new Scheam({ name:…
Venkatesh Somu
  • 4,710
  • 4
  • 23
  • 22
0
votes
2 answers

Apollo-upload-client with Cloudinary

I am trying out uploading images using apollo-upload-client, graphql and cloudinary, Goal: To successfully upload image to cloudinary, get the cloudinary url and insert into database Present: Don't get any error message yet don't see file uploaded…
Hendry Lim
  • 1,929
  • 2
  • 21
  • 45
0
votes
1 answer

In Neo4j Graphql Apollo server type definition how to add names with spaces?

My type definition is like this type COMPANY { "AIRLINE SEGMENT": String AIRLINE_TYPE: String } I get an error saying apollo server GraphQLError: Syntax Error: Expected Name, found : If I remove the space and quotes then I…
sushmit sarmah
  • 7,508
  • 6
  • 21
  • 24
0
votes
0 answers

GraphQL resolver returns copies of last item of the list

While using graphql-js package in my Node.js program, I see the QueryRoot resolver that's meant to return a list of custom objects, returns a list with copies of last item of what it resolves. const Person = new GraphQLObjectType({ name:…
Pradeep
  • 21
  • 2
0
votes
1 answer

Dynamically generate GraphQL schema

One of my application requires Graphql schema that can have fields added & resolved on the fly based on the data. for example need something like type Data { email: [String]! col1 :[Int]! col2: [Int]! ...col3: } where col1 ==…
radhikavm
  • 29
  • 7
0
votes
1 answer

Can i use MongoDB in my graphQL server without the use of prisma?

I want to use mongodb queries directly without the prisma. Is it possible? If possible, is this a good practice and will i be able to use all the functionalities of graphql, Like cursor based pagination and others?
0
votes
1 answer

Create GeoJSON GraphQL schema from third party library

I'm trying to use the graphql-geojson library in an Apollo/Express app to serve GeoJSON responses. The library provides the resolvers but I haven't found a way to add the types to my schema definition without writing them out by hand. And even then…
Greg Brown
  • 1,251
  • 1
  • 15
  • 32
0
votes
1 answer

how can I wait for books data getting from graphql client in async function?

I want to wait for books data getting from graphql query before sending response object async getUserBookList(req, res) { let responseObj = {}; const validationRes = this.validateGetUserBookList(req); const…
0
votes
1 answer

How to pass data from multiple collections in mongodb to 1 react table using graphql

I have a react-table that I'm passing data through graphql queries. but my query has relationships with different objects within the database collections. When I pass the data I only get data from one collection. Here's my query --- const…
0
votes
1 answer

graphql mongoose returning null

I am using graphql with express and mongoose. for some reasons, I am getting null value for embedded documents. tried both async/await and promise. Schema.JS const typeDefs = ` type Patient{ name:String } type Order { _id: ID! …
0
votes
1 answer

How to handle response in GraphQl and Neo4js

I am not able to get response back if the email is already exist in DB. I tried below example code. But I am getting null in response(see image) Here is my api {"query": "mutation authenticateUser($Phone: String!,$Email: String!, $type: String!,…
0
votes
1 answer

Get localized data from multilingual schema with GraphQL query

I have following MongoDB schema. Item { _id: ObjectId, translations: [{ language: String name: String }] } So my Item instance could look something like this. { _id: ObjectId("5ba3bf09d3121aba3ba2f488"), translations: [ { …
pneme
  • 23
  • 5
0
votes
1 answer

How to start ArangoDB-GraphQL-Express?

I looked at the support from ArangoDB, and google search, but it did not help me much...I am fresh in these topic, (but Polish proverb says that you should not be ashamed to ask questions). my situation is as follows, I have quite a very extensive…
CisSasGot
  • 779
  • 1
  • 8
  • 13