graphql-js Questions

2

I'm interested in getting feedback on the architecture of a web app I've inherited. Some useful context: App is client-side rendered, written in React and uses Apollo GraphQL for data fetching. SS...

11

I'm currently trying GraphQL with NodeJS and I don't know, why this error occurs with the following query: { library{ name, user { name email } } } I am not sure if the type of my resolve...
Refluent asked 1/10, 2017 at 14:40

3

I'm running the below GraphQL query to create data on dynamodb table, but gets the response with "Not Authorized to access createClient on type Client" Why this is happening at. GraphQL q...
Twopenny asked 5/2, 2022 at 7:59

3

this my code const NewVerificationCode = () => { const { loading, error, data = {}, refetch } = useQuery(CONFIRMATION_CODE, { skip: true, onError: (err) => {}, }); console.log(loading, e...
Idiocy asked 15/8, 2020 at 7:18

9

Solved

I use Express-graphql middleware. I send the following request in the body line: POST /graphql HTTP/1.1 Host: local:8083 Content-Type: application/graphql Cache-Control: no-cache Postman-Token: d71...
Augustaaugustan asked 18/4, 2016 at 10:36

5

I'm using apollo client for graphql. I set up the client in AppApolloModule that I'm importing in AppModule. I'm making a query in a service which is also imported right in the AppModule. Although ...
Agamic asked 13/3, 2018 at 13:39

3

Solved

I've got a type called Article in my schema: type Article { id: ID! updated: DateTime headline: String subline: String } For updates to it, there's a corresponding input type that is used by a...
Dextrosinistral asked 6/3, 2017 at 17:10

5

I have found that the graphql-js library does not allow dependencies to also use graphql. You would get the following error Duplicate "graphql" modules cannot be used at the same time since dif...
Narcosis asked 11/11, 2018 at 19:24

4

Solved

I am using graphql-tools. After receiving a GraphQL query, I execute a search using ElasticSearch and return the data. However, usually the requested query includes only a few of the possible fiel...
Wan asked 28/12, 2017 at 9:23

2

Solved

I have this input type and I would like to add a default Value to one of the fields. I want to add 0 to the value field inside the ExampleInput. type ExampleType { value: Int another: String } ...
Ore asked 27/7, 2018 at 18:55

4

I want to send double quote(") and back slash(\ ) in Graphql request and want to get it back in response. Please check bellow example: mutation M { signUp ( name: "Harsha Vardhan" username:...
Ornate asked 8/6, 2016 at 17:35

3

How to retrieve​ all values in enum type in graphql ? Example: enum TRUCKPE_NAME { TATA_407 TATA_709 TATA_1106 ECHIER_1103 } type Document { truckType: TRUCKPE_NAME } I want to get all n...
Krouse asked 10/9, 2019 at 18:48

2

Solved

With graphql, enum can make a predefined list of elements but strings don't work. For example: enum Dias { lunes martes miércoles jueves viernes sábado domingo } This returns an error Graph...
Sivas asked 11/5, 2018 at 22:15

1

We are developing micro-services in NestJS-typescript. Each of them exposes a GraphQL schema. In order to expose a single graph, we are using a federation service, also in NestJS. I was trying to i...
Lucielucien asked 1/2, 2022 at 15:37

3

Solved

I'm trying to do a simple mutation using GraphQL with the GraphiQL interface. My mutation looks like this: mutation M($name: String) { addGroup(name:$name) { id, name } } with variables: { &q...
Lippert asked 18/9, 2015 at 17:13

1

I'm trying to set timeout with prisma-labs/graphql-request. I've tried the way described here - https://github.com/prisma-labs/graphql-request/issues/103. const client = new GraphQLClient(config.u...
Inverson asked 14/11, 2019 at 20:28

2

Solved

this my code schema gql` type Query { user: X! } type User { name: String! } type Time { age: Int! } union X = User | Time `; resolvers { X: { __resolveType: obj => { if (obj.n...
Eagle asked 29/12, 2019 at 13:23

2

I'm having a lambda function which makes use of Graphql and webscraping to return some data as response. Sometimes it works without giving an error like 502, sometimes it doesn't. To me it looks li...

4

Solved

I have a product and items Product: { id: Int style_id: Int items: [items] } Items: { id: Int product_id: Int size: String } I want to query products but only get back products that ha...
Maintopmast asked 7/12, 2018 at 8:25

4

I have a rather large/complex protobuf definition of an API, and I wonder if there's a convenient tool to automatically generate a textual GraphQL schema and its (nested) types from a subset of thi...
Calender asked 6/6, 2017 at 19:6

3

Is it possible in GraphQL to have an input type that is also a union? Something like: const DynamicInputValueType = new GraphQLUnionType({ name: 'DynamicInputType', types: [GraphQLString, Grap...
Allaallah asked 24/7, 2017 at 19:52

2

Solved

I want to create a graphql type that can return either an Array of Integers or String. I've already tried using union in the form union CustomVal = [Int] | String, but this returns an error. The ...
Haplo asked 12/6, 2018 at 4:13

2

I want to use the library https://github.com/apollographql/graphql-tag I'm looking for someone smarter than me that understands how to actually use it. Say I have a GraphQL query document like so: ...
Rolland asked 5/3, 2022 at 11:54

5

I'm trying to call a service through Graphql with Postman. From my app (React) I can use all the services with no problem (so, they are running ok), but I want to test them alone with Postman. I'm...
Trivia asked 11/12, 2019 at 14:11

3

Solved

I am using graphql-express to create an endpoint where I can execute graphql queries in. Although I am using Sequelize with a SQL database it feels wrong to use it directly from the server outside ...
Diarthrosis asked 2/1, 2017 at 10:8

© 2022 - 2024 — McMap. All rights reserved.