Serverless GraphQL API built with Netlify functions and Apollo. This is a POC using a serverless architecture for CB v3. The API reference all the proof of concepts will be following: https://app.swaggerhub.com/apis-docs/billglover/CodeBuddies/0.0.1
> npm i -g netlify-cli # install Netlify cli first!
> git clone git@github.com:codebuddies/serverless-concept.git
> cd serverless-concept
> npm install
> ntl dev ## this will run your server locally
We will use the handly GraphQL playground app to test/run queries against our GraphQL API. Go ahead and download and install it on your local machine.
Enter the following url: http://localhost:8888/.netlify/functions/graphql
in GraphQL playground.
GetAllResources:
{
resources {
id
title
description
credit
url
}
}
GetResourceById:
{
resource(id: 1) {
id
title
description
url
credit
}
}
Front-end url: https://hardcore-haibt-da9a6b.netlify.com/
Backend GraphQL url (lambda function): https://hardcore-haibt-da9a6b.netlify.com/.netlify/functions/graphql
Please use GrapghQL playground to run your queries against the live site hosted on Netlify.
- Build out front-end UI to make the calls to the backend
- Add a datastore to persist data on the backend lambda function
- Add mutations (create new resource)
- Netlify
- CRA (for front-end)
- AWS Lambda functions with node (via Netlify functions)
- GraphQL (Apollo)