Learn how YOU can build a Serverless GraphQL API on top of a Microservice architecture, part I

Chris Noring on April 13, 2019

Follow me on Twitter, happy to take your suggestions on topics or improvements /Chris The idea with this article is to show how we can build micr... [Read Full]
markdown guide
 

Does Azure has an equivalent of AWS AppSync?

 

Not sure. Have to check that with my colleagues. Here is a comparison page we put together though, service by services comparing AWS and Azure, docs.microsoft.com/en-us/azure/arc...

 

ok, the answer is we don't have anything exactly like AppSync but we are actively working on building something like it

 

Hi Rene. Still early days.. We are working generally on making it easier to use our services with JavaScript though, here is an example where you start with a NestJS app and turn that into serverless and you can easily hook in data sources into it dev.to/azure/build-your-first-serv..., have a look here as well dev.to/azure/introducing-nosql-azu... and here's a deployment tool to make serverless deployment easier github.com/manekinekko/hexa

Thanks Chris. I was most interested in an Azure equivalent to AWS AppSync. I am aware of Hasura but we would be more comfortable with a GraphQL PaaS that's offered natively by Azure. Any ETA on that? Thanks.

 

trying follow along and getting error with graphql api's app.js....

graphql({
^

ReferenceError: graphql is not defined
at Object. (/Users/me/devl/projects/devto/graphql.api/app.js:6:1)

Is there source code I can compoare to see if I'm doing something wrong?

 

hi Greg. Sorry you got stuck.. Yes you need a const { graphql } = require('graphql'), at the top, also ensure you have run npm init -y followed by npm install graphql at the root directory of this file

 
 

Thanks Chris. This looks like it's got potential. I think there's a presentation problem with your tutorial though.
We get "The Plan" and then it wanders on without giving us any distinct "Now start by doing this!"
At the moment I can't distinguish the point where you've stop outlining the plan and start telling us step one in actioning the plan. Could you help us by giving it a bit more structure, fleshing it out a bit more and guiding us through the build in a more step by step form.

 

hi Simon, thanks for this comment. I'll definitely see how I can give it better structure/headlines. I'll write another comment once updated

 

That will be brilliant. It's really good of you to respond. Thanks!

of course, thank you for making the article better :)

 

Thanks Chris! Great article. You should check out our Marvel GraphQL wrapper! Marvelql.com . The first query is a bit slow due to the official REST APIs shortcomings but we have implemented a cacheing strategy to speed up subsequent results. Enjoy!

 
 

Thanks for that Trev. Will check it out. SWAPI GraphQL is one of my favorites, this sounds fun too :)

 

Thanks Chris for this very inspiring article. As i am a PHP-Developer, i ported this to PHP, just for the sake of it ;-)

 

Happy to hear that. Thanks for the link :)

 

Nice series, but I would suggest to follow more 3factor.app architecture approach. For GraphQL part you can use hasura.io free and open source engine. Engine will run in docker container and will connect to Postgres database auto generating GraphQL API for you. So you won't need to write any schema at all. And while the engine won't be serverless by itself it can connect to event triggers which can be connected to serverless functions. Moreover, GraphQL server you've created can be used inside the engine and stitch GraphQL schema together.

Would love to collaborate on doing some cool Azure and Hasura stuff. If you are interested, reach me out on twitter.com/VladimirNovick

 

Hi Chris, Thank you for this awesome post. Just a quick remark:

I have added

"scripts": { "start": "node app.js" }

to package.json file for both APIs. So "npm start" will be executed successfully.

Cheers,

 

hi.. Thank you for this comment. I'll make sure to add this info

 

"We are not there yet but part two will take us all the way"

Or...

Create a now.json file, configure it accordingly and... now

That's it, part 2 done :)

 

well no.. the docker images needs to be pushed up.. before that can be done we need a resource group, a container registry. Then we need to create a service endpoint from each container.. and then we can replace each URL with a real one... and we need the serverless part too :) .

 

Hi Chris,

Thank you for this awesome article! Simple and straight to the point. I am just starting with microservices and graphql stuff and I was able to easily follow this tutorial. :)

 

Happy to hear that :) Thank you for your comment

 

You have a spelling error with “Trying out or GraphQL. Thanks for the great post! Looking forward to part two.

 
code of conduct - report abuse