Shahzad6077 / virtual-lolly-faunadb-fn

Virtual Lolly app with serverless functions using Faunadb | gatsby | Apollo Server/Client

Home Page:https://virtual-lolly-shahzad.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gatsby Apollo Netlify

Gatsby Starter Apollo Netlify

This is an easy way to start developing fullstack GraphQL apps with Gatsby and Apollo Server (powered by Netlify functions).

Requirements 🏁

Usage ⚙️

Create a new Gatsby project specifying this starter, navigate to it, and start Netlify Dev server:

# Use the Gatsby CLI to create a new project, specifying this starter.
gatsby new my-new-project piducancore/gatsby-starter-apollo-netlify

# Go to your new project’s directory.
cd my-new-project/

# Start your local Netlify Dev server
netlify dev

That's it. Your Netlify Dev server is running at http://localhost:8888!

Start by checking src/pages/index.js to see an example query using the useQuery hook from @apollo/client.

Also check functions/graphql/graphql.js to start developing your Apollo Server.

You can find Apollo Server's GraphQL Playground at http://localhost:8888/.netlify/functions/graphql

Note: You'll also see a second link: http://localhost:8000. This is Gatsby's default dev server, and it won't have access to our Apollo Server (or any other serverless function) since Netlify Dev is doing all the proxying.

Deploy to Netlify 🚀

With the Netlify CLI you can create deployments directly from the command-line:

# Login with the Netlify CLI
netlify login

# Configure continuous deployment for a new or existing site
netlify init

# Create new deploy
netlify deploy

About

Virtual Lolly app with serverless functions using Faunadb | gatsby | Apollo Server/Client

https://virtual-lolly-shahzad.netlify.app/

License:MIT License


Languages

Language:TypeScript 74.8%Language:JavaScript 25.2%