Skip to content
Advertisement

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

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

Advertisement