An open API service indexing awesome lists of open source software.

https://github.com/nossbigg/react-ssr-graphql-poi-example

Barebones example of using POI/non-POI data using Next.js and GraphQL.
https://github.com/nossbigg/react-ssr-graphql-poi-example

graphql nextjs react server-side-rendering

Last synced: about 2 months ago
JSON representation

Barebones example of using POI/non-POI data using Next.js and GraphQL.

Awesome Lists containing this project

README

        

# react-ssr-graphql-poi-example

This repository is a barebones example of how to retrieve and display Point-of-Interest (POI)/non-POI information using Next.js Server-Side Rendering and GraphQL, with an ideal developer experience

## Running Example Locally

**Commands to run locally**

- `yarn dev`: Starts both Next.js instance and GraphQL server instance

**Instances started**

- `http://localhost:3000/`: Next.js SSR Instance
- `http://localhost:3000/api/graphql`: GraphQL Instance

## References

- [Basic Features: Data Fetching | Next.js](https://nextjs.org/docs/basic-features/data-fetching)
- [API Reference: apollo-server - Apollo Server - Apollo GraphQL Docs](https://www.apollographql.com/docs/apollo-server/api/apollo-server/)
- [Queries - Client (React) - Apollo GraphQL Docs](https://www.apollographql.com/docs/react/data/queries/)
- [Customizing the behavior of cached fields - Client (React) - Apollo GraphQL Docs](https://www.apollographql.com/docs/react/caching/cache-field-behavior/)