I added a mutation to delete comments and whenever I try to delete a comment I get this error. Resolver Type definition Answer I found out that the issue was in importing errors from apollo-servers had to be in an alphabetical order.
Tag: apollo-server
Nested Query GraphQl
I am new using graphql and I would like to know how could I filter my query to get the recipes that has some of the ingredient objects I have in my input array. this is the schema.gql file this recipe schema has 1 respective service and the respective Query resolvers the main idea here is just to have one
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 for
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 tried many ways, tried to map() args or even to
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 example from below running: The other
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 around to try and find a way to parse this into
Custom Error Object with Apollo Server
I’m trying to use a custom error with apollo-server and it seems that my custom error has a property (code) that isn’t available from within formatError. I have a simple error handler works something like this: I’m having trouble because when I log error.code from within formatError it’s not available. How can I propagate custom properties (like code) of error