How to use ES6 with apollo server
What do we need to do to make ES6 syntax available for apollo server development? I've tried to install the babel-cli babel-preset-env packages and created a .babelsrc file, but when I use ES6 syntax for imports it doesn't understand the syntax.
Moving Apollo Graph from localhost to web server
To get started learning and building an application using Apollo Graph I followed the Apollo example that implements the Rest API to SpaceX launches. https://www.apollographql.com/docs/tutorial/introduction The pattern matched what I wanted to implement so I removed the rocket…
Multiple datasource with Apollo
We are building new GraphQL api using apollo server 2. Most of our data live in MongoDB and we are able to access easily with mongoose. But there are many data points which exists in our mySQL database. How can we connect to multiple database in GraphQL API to connect to either…
Modify Query Results through Custom Operator?
Hi, I have a use case where I want to mutate my query result via operator such as Pivot, Filtering and Grouping. Is there a way to do those operation on server side and potentially cache the result. Is that possible? …
apollo-server-express not working with query arguments
I'm just learning Apollo and Graphql, so sorry if it's stupid question. I tried running the server example from https://www.npmjs.com/package/apollo-server-express. It works well with simple query (hello world), but when I try one with arguments (rollDice from Apollo tutorial),…
How to log queries/mutations for auditing on apollo-server?
I'd like to log all queries/mutations executed on apollo-server. Is there complete example that could be used in production environment? I'd like to log • content of GraphQL mutation/query …
Share types between files with mergeSchemas?
Hi all, I have the following layout for my schemas. Schema 1: …
Anyone have a good pattern on implementing resolver based filtering?
I would like to find a pattern that allows my resolvers to easily share (at least abstract) logic to implement filtering. Preferably be able to limit, offset, sort, search etc. Just wondering if anyone has a good approach besides the normal if statements?
Abort request in context function?
So I have a context function (Apollo Server v1.x), that checks for the existence of a JWT, and if it exists, attempts to validate it. Now, firstly, there are some valid requests that can be made without a JWT. So it's not mandatory, however, if one is sent I really want to make…
Enum Forwards Compatability
Has anyone had a situation where they defined a enum in Apollo GraphQL and over the weekend, the micro-service decides to change one of the values or add a new value, it breaks GraphQL because it wasn't defined in GraphQL's type def in advance? What is a viable solution to…