What does Apollo/GraphQL deployment look like with Galaxy?

I’ve got a SaaS I’m currently running on Galaxy, with mLab providing the database. Meteor + React, pretty standard setup.

I’d like to dive into learning GraphQL & Apollo soon, and I’m curious what that sort of deployment would look like on Galaxy. I understand that GraphQL is a separate server you have to run. Would that change the deployment stack to this?

  • Meteor/React app (Galaxy)
  • MongoDB (mLab)
  • GraphQL Server (??? some service provider/host)

I’m a total newbie to GraphQL, so any/all info would be great. I plan to tackle https://learnapollo.com as my starting point. If there are other tutorials & docs I should look at, let me know!

1 Like

I would think you could just add express to your meteor app with a endpoint at /graphql right? Then deploy it to galaxy like any other meteor app?

You can basically use the setup you learn here but inside your meteor app:

https://www.udemy.com/graphql-with-react-course/learn/v4/overview

Use express-graphql package with express. Then wrap your react-router in apollo client. The course is probably worth taking. It saved me from having to scrape together 40 blog posts to try and learn it.

1 Like

Thanks! This is what I wasn’t sure about, whether GraphQL was a full-blown server that runs separately (a la Redis or MongoDB), or if it was just a separate process that runs alongside Meteor with its own endpoint/port.

I’ll check out that course. Stephen Grider’s stuff rocks.

There is apollo-server too. I don’t know much about it. I would think its basically express-graphql with some nice helpers and a few less steps to configure… but my guess is it is also an endpoint for ‘myurl.com/graphql’ which you will point your apollo-client at. So it’s no different than having a meteorapp with a Restivus/Picker/Express API endpoint. Then apollo-client is a lot like a redux store that points at that endpoint.

Here is a new article introducing a tool create-graphql-server that may provide some more details.

Is this course worth passing now for Apollo 2?

I would like to add that for Meteor developers live can be even easier. We have DDP, which works great for GraphQL.

It supports queries, mutations and subscriptions out of the box and works with Galaxy (because it uses DDP). No need to setup a server of any kind.

Yes, this is a shameless plug, but I thought you might be interested :wink:

3 Likes

I think it’s probably worth passing on. I think it used an older version of apollo 1. But, I’m not sure if he’s updated it since then. It may still be helpful if you’re starting graphql from 0.

1 Like