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

`ctx.prisma.status is not a function` error, even though it's defined

I am using the setup in "build an app" of the getting started guide, albeit slightly modified in terms of directory structure. I am receiving the following error when trying to run a basic query against the graphql-yoga playground at…
tsujp
  • 1,066
  • 1
  • 12
  • 29
0
votes
1 answer

promise rejection on setting up pgPromise wrapper for postgesql db: using wrong db name

I'm trying to set up a react app that uses graphql with a postgresql database. Right now im only trying to set up a pg adaptor to my existing postgresql db that I host locally. When running node pgAdaptor.js i get a rejected promise saying that the…
0
votes
0 answers

Unknown column 'getContent.movie_id' in 'field list

my whole schema const Films = new GraphQLObjectType({ name: 'films', interfaces: () => [MovieStream], fields: () => ({ movie_id: { type: GraphQLString, }, id:{ type: GraphQLID }, name: { …
Upasana
  • 45
  • 9
0
votes
1 answer

How to implement interface using GraphQL and node

I want to achieve the fields of one object type within another object type Here is my schema file. const Films = new GraphQLInterfaceType({ name: 'films', fields: () => ({ id:{ type: GraphQLID }, name: { type:…
0
votes
1 answer

How do should I approach a local server in conjunction with graphQL schemas?

(Currently not using Apollo) So I have server.js: let graphqlHTTP = require('express-graphql'); ... // (other graphQL setup) let users = []; // or any DB solution here const { UserType, UserFactory } = require('./schema/typeDef.js'); const…
Conanap
  • 155
  • 1
  • 11
0
votes
1 answer

Is it possible to fetch data from multiple tables using GraphQLList

In GraphQL we can write the object type in GraphQLList and fetch all the fields. I am using Association and it is joining the two tables but I am unable to fetch the field of both the tables. It only takes the fields what I have written in…
0
votes
0 answers

Combining GraphQL queries

I am building my first GraphQL based project so forgive me if this is a newbie question. I have arranged my queries and mutations in the following fashion: ├── graphql │   ├── lessons │   │   ├── logic.js │   │   ├── query.js │   │   ├──…
Rajat Saxena
  • 3,834
  • 5
  • 45
  • 63
0
votes
1 answer

Heroku failed to inject port number to process.env.PORT

I'm deploying my server to Heroku, but for some reason the network shows it keeps making request still to the localhost, instead of dynamically injecting a port number to process.env.PORT chrome console error message This is the setup of my server.…
Bing Wang
  • 11
  • 2
0
votes
0 answers

How to give an alias name to a schema field in graphql

const Films = new GraphQLObjectType({ name: 'films', fields: () => ({ id:{ type: GraphQLString }, name: { type: GraphQLString, }, uniq_id: { type: GraphQLString, }) I want to give an…
Upasana
  • 45
  • 9
0
votes
1 answer

GraphQL association issue

Before diving into the code, here is a high-level explanation of my question: In my GraphQL schema, I have two root types: Developers and Projects. I'm attempting to find all developers who are part of a given project. The query might look like…
Andy Hoffman
  • 18,436
  • 4
  • 42
  • 61
0
votes
0 answers

Apollo-react query returns null when GraphiQL returns data

The same query in GraphiQL returns data, but returns null in React-Apollo. Problem (so far) is only with this query. I've used a "Signup" mutation that returns data when tried from both React-Apollo and GraphiQL. This leads me to think the problem…
0
votes
1 answer

GQL not returning results

I'm practicing GQL, I've issue while displaying the data in Playground. I trying to hit the jsonplaceholder api, to retrieve all posts and display them but it throws the following error. error: GRAPHQL_FORMAT_ERROR: Expected Iterable, but did not…
Stzl
  • 65
  • 1
  • 7
0
votes
0 answers

I have an SQL syntax error in graphQL when i hit the query using join monster

This is My Schema const graphql = require('graphql'); const joinMonster = require('join-monster'); const FilmDb = require('../model/Films'); const { GraphQLObjectType, GraphQLList, GraphQLString, GraphQLInt,GraphQLSchema } = graphql; const Films =…
Upasana
  • 45
  • 9
0
votes
1 answer

How to write GraphQL Resolvers properly?

So the GraphQL site has S#*t documentation as far as I can tell on nested queries like user spesifics and its driving me nuts (I seriously want to pull me hair out right now). Can someone please explain to me how revolvers work and why what I'm…
Graeme Ford
  • 166
  • 1
  • 2
  • 16
0
votes
1 answer

How I query the update mutation at graphql?

I have my code, and some questions. 1. How can I use the 'updateMessage' Mutation? and 2. Why do I have to use 'Message Class'? or What is different to use that Class? I know How I can write the query for the createMessage Mutation but I don't…
Jadyn
  • 13
  • 3