https://github.com/piducancore/gatsby-starter-apollo-netlify
This is an easy way to start developing fullstack GraphQL apps with Gatsby and Apollo Server (powered by Netlify functions).
https://github.com/piducancore/gatsby-starter-apollo-netlify
apollo-server gatsby netlify netlify-functions
Last synced: 15 days ago
JSON representation
This is an easy way to start developing fullstack GraphQL apps with Gatsby and Apollo Server (powered by Netlify functions).
- Host: GitHub
- URL: https://github.com/piducancore/gatsby-starter-apollo-netlify
- Owner: piducancore
- License: mit
- Created: 2019-07-24T20:30:38.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-10T00:48:09.000Z (almost 2 years ago)
- Last Synced: 2025-05-09T00:44:59.370Z (15 days ago)
- Topics: apollo-server, gatsby, netlify, netlify-functions
- Language: JavaScript
- Homepage: https://gatsby-starter-apollo.netlify.app/
- Size: 1.08 MB
- Stars: 11
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Gatsby Starter Apollo NetlifyThis is an easy way to start developing fullstack GraphQL apps with [Gatsby](https://github.com/gatsbyjs/gatsby) and [Apollo Server](https://github.com/apollographql/apollo-server) (powered by [Netlify functions](https://www.netlify.com/docs/functions/)).
## Requirements 🏁
- A [Netlify](https://www.netlify.com) account.
- The latest [Netlify CLI](https://www.netlify.com/docs/cli/). (`npm install -g netlify-cli`)## Usage ⚙️
Create a new Gatsby project specifying this starter, navigate to it, and start Netlify Dev server:
```sh
# 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:
```sh
# Login with the Netlify CLI
netlify login# Configure continuous deployment for a new or existing site
netlify init# Create new deploy
netlify deploy
```