All Questions
10 questions
0
votes
1
answer
202
views
GraphQL query giving error, but it still updates my database
I'm making a project in React, using apollo-server-express, graphQL and postgreSQL, I've done the type definitions and some queries and mutations, but there is 3 in specific that isn't working ...
1
vote
0
answers
128
views
CORS issue while enable under attack mode in cloudfare
We facing the "CORS" Issue while enable Under Attack Mode, We are working on the dynamic Marketplace project using NodeJs (graphql,apollo-server) and ReactJs (graphql,apollo-client),we have ...
1
vote
1
answer
7k
views
Issue with useMutation with await and promise
I am performing the useMutation operation in the innermost loop and want to check the remaining cost upon every mutation. But it gets checked after all the mutations which is a problem because for ...
19
votes
6
answers
39k
views
useQuery returns undefined, But returns data on gql playground
"@apollo/react-hooks": "^3.1.3",
"apollo-client": "^2.6.8",
Apollo client return undefined on react app but return the data on gql playground, I don't understand why don't it works on client-side but ...
1
vote
1
answer
2k
views
How to send an error message from the apollo- server
this my code
in apollo clients I use useMutation.
apollo clients
const [addTodo, { loading, error, data }] = useMutation(gql);
apollo-server
Mutation: {
signUp: async (_, formSignUp, { ...
9
votes
1
answer
7k
views
How to pass cookie from apollo-server to apollo-clenet
Mutation
Mutation: {
signUp: (_, { res }) => {
try {
res.cookie("jwt", "token", {
httpOnly: true
});
return "Amasia";
} catch (error) {
return "error";
...
1
vote
1
answer
264
views
Apollo Server v2 - GraphQL resolver not being invoked
I am a newbie to the graphql world and I'm trying to setup multiple modular schemas and resolvers using Apollo Server v2.
I noticed a weird behavior where I have issues with the order of my resolvers....
2
votes
1
answer
4k
views
Getting Error: "Mutations" defined in resolvers, but not in schema
I am learning graphQL. Could somebody help me understand why Mutations are not being identified in Schema?
Getting this error:
Error: "Mutations" defined in resolvers, but not in schema
Following ...
0
votes
1
answer
27
views
I am not getting the mongoose queried user as the returned value
This is my apollo resolver and I want to return the user but it does not return anything and if I return the query itself then I cannot do the password checking
my code:
login: (parent, { email, ...
1
vote
1
answer
750
views
Mocking apollo graphql client
I have written the following node client which interacts with the graphql server and using apollo-tools node module. I was not able to find any mock test for the below in node. Pls let me know is ...