express-graphql Questions

15

I'm trying to install express-graphql but getting this error. Please, help! npm install --save express-graphql npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! ...
Elaelaborate asked 4/1, 2022 at 6:40

3

const { ApolloServer, gql } = require('apollo-server-express') const express = require("express"); const next = require("next"); const dev = process.env.NODE_ENV === "development"; cons...
Hemostat asked 28/12, 2018 at 6:25

2

Solved

I tried changing the addTypeName: false in the Apollo client in GraphQL apollo.create({ link: httpLinkWithErrorHandling, cache: new InMemoryCache({ addTypename: false }), defaultOptions: { wat...
Piracy asked 20/3, 2019 at 11:36

9

Solved

Have installed graphql-upload, do import { graphqlUploadExpress } from 'graphql-upload'; And getting this error: Error: No "exports" main defined in graphql-upload/package.json Dependenci...
Aesthetically asked 24/5, 2022 at 10:10

9

Solved

Here is my simple graphql express app const express = require('express'); const graphqlHTTP = require('express-graphql'); const app = express(); app.use( '/graphql', graphqlHTTP({ graphiql: tru...
Apanage asked 6/7, 2020 at 17:3

9

Solved

Getting EOF error every time at same line, changed code many times and even degraded to previous versions of graphql but no positive results. My code is: const graphql = require('graphql') const _...
Boxboard asked 12/6, 2018 at 23:43

1

Solved

I got this type of query query { searchRandom (param : MyObjectClass){ city } } How may I set param with the type of MyObjectClass and pass it in the query? To be able to test here?
Louisalouisburg asked 18/2, 2022 at 19:20

9

Solved

I am trying to use Apollo Server's Upload scalar to send files to S3 directly. My schema: const { gql } = require('apollo-server-express') module.exports = gql` extend type Mutation { createPic...
Watt asked 7/1, 2020 at 0:49

2

Solved

I am trying to do customize messaging with GraphQLError. There are few use cases that I want to handle with GraphQL Error: when username and password did not match, I want to return customize t...
Encaustic asked 7/8, 2018 at 8:26

3

Solved

I'm trying my first GraphQL approach. Here is the code: schema.js: import { GraphQLSchema, GraphQLObjectType, GraphQLInputObjectType, GraphQLNonNull, GraphQLString, GraphQLBoolean, GraphQL...
Hydrometeor asked 7/7, 2017 at 23:28

3

we are using Apollo/Graphql in our application, and we are facing an issue. The application is developed in Angular 5, and NodeJS as backend with graphql server that will respond to the front end....
Cottonmouth asked 23/5, 2018 at 6:26

2

Solved

I am trying to make a mutation to my Shopify store from python. I am new to graphQL, I have been able to make the mutation using graphiQL but I am not certain how to do it directly from my code. T...

2

Solved

I am working on an app using a React frontend and Express backend, with GraphQL setup through Apollo (I am following and modifying tutorial https://www.youtube.com/playlist?list=PLN3n1USn4xlkdRlq3V...

1

Solved

I have a very basic graphql mutation in the frontend that I send to my backend. I am using this code on the by graphql-request as a guide. With primitives it works: const mutation = gql` mutation ...

3

I started to use graphQl with react relay. And I followed some tutorials and I can able to get and post with the help of mutations and queries. Everything works fine but my question here is, Whe...
Tetrastichous asked 31/1, 2018 at 20:20

2

Solved

I'm new to GraphQL and going to build a solution using GraphQL. Everything looks cool but just concerned on how to implement the role based authorization inside GraphQL server (I'm considering usi...
Cautious asked 11/2, 2018 at 19:46

3

Solved

I tried to used it with the context connection, and adding the subscription params into the Apollo Server but it doesn't work. Is my first time using Apollo Server Subscriptions and i don't know if...

1

Solved

We are implementing GraphQL service, which stands in front of several backend microservices. For example, we have a Product and each product has a list of history orders. Our backend server provi...
Remission asked 18/9, 2019 at 8:51

0

In my nodejs application I use graphql with express-graphql. I can't see any cache option that library provide. How should I do the cache for graphql requests? (I need to support get and post)
Chromosphere asked 15/8, 2019 at 10:23

1

Solved

I've been reading through the graphQL docs and found that they've explained the implementation of the graphql server in 2 ways: one using graphql-yoga which is a fully featured graphql server and a...
Druci asked 25/4, 2019 at 17:7

2

Solved

I want to show some errors that comes from graphql server to user. Have some component with callback that use some mutation onSave() => { this.props.mutate({ mutation: CHANGE_ORDER_MUTATION,...
Resnatron asked 13/3, 2019 at 17:27

1

Is there a way to add a schema directive by overriding one of the methods of SchemaDirectiveVisitor for all the queries and mutations? For example to check the authentication token in a directive....
Camala asked 10/1, 2019 at 6:57

2

I have been working on a GraphQL and firing queries to get the JSON response into react app. But I need to fire a query which will return me the max and min value from the column. I have gone thr...
Unripe asked 8/10, 2018 at 12:18

1

Solved

Given this schema: interface INode { id: ID } type Todo implements INode { id: ID title: String! } type Query { node(id: ID!): INode } Given this class: export default class Todo { const...
Vice asked 31/10, 2018 at 7:46

1

Solved

Can someone help me on this, My setup was as follows prior to Apollo 2.0, I had a server.js in which i used express and graphql-server-express I had a http only cookie session, when a user logs in ...
Psalterium asked 23/8, 2018 at 2:59

© 2022 - 2024 — McMap. All rights reserved.