I have a problem with WebStorm syntax highlighting. I created valid GraphQL query which works on localhost app but WebStorm says that unknown field “familyMembers” on object type “Query” and highlights the whole query in red. I am really confused but maybe I should change something ins…
Tag: graphql
How to send signed HTTP request from AWS Lambda to AppSync GraphQL?
I am not sure how to send signed http request do AppSync GraphQL endpoint. There is no library for do that in AWS. aws-amplify don’t work because works only in browser, not in Lambda function. aws-sdk for AppSync is only for admin usage, it doesn’t have methods for call user side api It is possibl…
Unhandled Rejection (Error): Expected undefined to be a GraphQL schema
I’m trying to build the post pages imported from WordPress, I run “gatsby develop” and I head to the URL. The front page flashes up and then I get this error: The query which is highlighted in my ‘PostTemplate.js’: I run the same query through the GraphiQL interface and it sends …
Modifying Response of Graphql before sent out
I am looking for a way to modify the response object of a graphql query or mutation before it gets sent out. Basically in addition the the data object, I want to have extra fields like code and message. At the moment I am solving this by adding the fields directly into my GQL schemas take this type definition…
How to use the GraphQL Get query from aws in React
I’m trying to make use of the getquery for graphql in react.js. But I can’t figure out how to go about doing this. I already succeeded to use the list query. How does one go about using the get query? Thanks! Answer You need an ID to retrieve an item with any get query. getPatient(id:”YOUR I…
Is there a way to get rid of [Object: null prototype] in GraphQL
I’m trying to make one-to-many relationship database with Mongoose and GraphQL. Whenever I insert the data to GraphQL mutation argument, I will get [Object: null prototype] error. I notice the object will have [Object: null prototype] in front of it when I tried to console.log for debug purpose. I have …
CORS blocks mutation in GraphQL Yoga
I am working here with a graphql prisma backend and a graphql yoga express server on top of that. In the frontend, I am trying to call a signout mutation but its blocked by the CORS policy. Though I have added cors settings in my graphql yoga server, I keep getting this error. GraphQL Queries are working fine…
Subscription not connecting using ApolloServer
I am trying to get a subscription up and running with ApolloServer (v 2.2.2). I had a setup that all-of-a-sudden just stopped working. When I try to connect to the subscription in graphiql/PlaygroundI get the error: As I have rest-endpoints in my app I need to have express but I can’t get the minimal ex…
Error: Cannot use GraphQLSchema “[object GraphQLSchema]” from another module or realm
Given the following code: I get this error: Error: Cannot use GraphQLSchema “[object GraphQLSchema]” from another module or realm. Ensure that there is only one instance of “graphql” in the node_modules directory. If different versions of “graphql” are the dependencies of o…
How to parse GraphQL request string into an object
I am running Apollo lambda server for GraphQL. I want to intercept the GraphQL query/mutation from the POST request body and parse it so I can find out which query/mutation the request is asking for. The environment is Node.js. The request isn’t JSON, it’s GraphQL query language. I’ve looked…