Skip to content

Proof-of-concept for building CodeBuddies V3 using serverless

Notifications You must be signed in to change notification settings

codebuddies/serverless-concept

Repository files navigation

Serverless proof-of-concept for CodeBuddies V3

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

Local development

> 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

Running GraphQL queries

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.

Example queries

GetAllResources:

{
  resources {
    id
    title
    description
    credit
    url
  }
}

GetResourceById:

{
  resource(id: 1) {
    id
    title
    description
    url
    credit
  }
}

Live site deployed on Netlify

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.

TODO

  • 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)

Technologies used

  • Netlify
  • CRA (for front-end)
  • AWS Lambda functions with node (via Netlify functions)
  • GraphQL (Apollo)

About

Proof-of-concept for building CodeBuddies V3 using serverless

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •