• Stars
    star
    562
  • Rank 79,281 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example projects to help you get started with Hygraph

Hygraph Examples

Example projects to help you get started with Hygraph

Using this repo

All examples in this repo use the same Hygraph project. Clone it to get started:

Clone project

When working with this repo locally with your own Hygraph project, you'll need to add the following to your .env:

HYGRAPH_ENDPOINT=
HYGRAPH_TOKEN=

Examples where we only query the data will hardcode the HYGRAPH_ENDPOINT to get you going using the example locally, or on Codesandbox.

Examples

Hygraph Content API Features & Recipes

Examples demonstrating how to use Hygraph features.

Features Description
Using Asset Upload Programmatically upload assets using the Asset Upload endpoint
Using Management SDK (Video) Basic Management SDK script to create a schema.
Using Remote Fields (Video) Basic Management SDK script to create a schema with Remote Fields to query data directly from the Stripe API
Using Mutations (Demo, Video) Next.js app demonstrating how to use Hygraph mutations with graphql-request, SWR and API routes
Using Pagination (Demo, Video) Next.js app demonstrating how to paginate Hygraph queries with graphql-request
Using Rich Text Renderer (Demo, Video) Next.js app demonstrating how to render Rich Text with @graphcms/rich-text-react-renderer
Using Union Types A basic product marketing site using union types to compose UI 'blocks' with components. Built with Next.js, graphql-request and Tailwind CSS

Frameworks & Libraries

Examples demonstrating how to use Hygraph with popular application frameworks.

Frameworks & Libraries Description
Algolia (Demo, [Video][video6]) Sync content to Algolia via webhooks on publish using Next.js API routes.
Apollo Client 3 (Demo, Video) Using Apollo Client 3 to query data from Hygraph.
Apollo Server (Demo, Video) Using apollo-datasource-graphql to pull a Hygraph schema into an existing Apollo Server
Express (Demo, Video) A simple Express app using ejs templating and awesome-graphql-client
Gatsby (Demo) A basic Gatsby site that uses gatsby-source-graphcms to build product pages with data from Hygraph
Gatsby (File System Route API) (Demo, Video) A basic Gatsby site that uses gatsby-source-graphcms to build product pages using Gatsby's File System Route API
Gatsby Image (Demo, Video) How to use gatsby-image with Hygraph assets
[Hygraph Image] (Demo, Video) How to use [@graphcms/react-image] with Gatsby
GraphQL Codegen (Demo) Automatically generate26 types for your Hygraph project with GraphQL Code Generator
Schema Stitching (with GraphQL Mesh) Stitch 3 GraphQL APIs into one with GraphQL Mesh
Gridsome (Demo, Video) A basic example using gridsome create CLI and @gridsome/source-graphql
MDX (with Gatsby) (Demo, Video) How to use gatsby-plugin-mdx with RichText fields from Hygraph.
MDX (with Next.js) (Demo, Video) This example demonstrates how to use markdown fields from Hygraph with MDX in Next.js
Next.js (Demo, Video) A basic Next.js application, featuring getStaticProps and getStaticPaths to build static product pages
Next.js i18n Routing (Demo, Video) How to use Next.js Internationalized Routing with Hygraph content
Next.js Image (Demo, Video) How to use Next.js Image Component with Hygraph assets
Next.js Image with Custom Loader (Demo, Video) How to use a custom loader function with Next.js Image Component and Hygraph assets
Nuxt.js (Demo, Video) A simple Nuxt.js starter using create-nuxt-app CLI with Tailwind and Axios added
React.js (Demo, Video) This example demonstrates how to query from Hygraph with graphql-request in React.js
React.js with React Query This example demonstrates how to query from Hygraph with React Query in React.js
Vue.js (Demo, Video) A vanilla Vue.js starter using vue create CLI with Vue Router
SvelteKit (Demo, Video) A Svelte example using SvelteKit and graphql-request to fetch data
SvelteKit with URQL (Demo) A SvelteKit example URQL to fetch data
Eleventy (Demo) An Eleventy example using graphql-request to fetch data.
Astro (Demo) An Astro example using graphql-request to fetch data.
Vanilla JS (Demo) Query in the browser with no frameworks, just use the Fetch API.
NextAuth (Demo) Authenticate with NextAuth.js and update account info with Hygraph.
Houdini (Demo) An Houdini example with SvelteKit.
Swift A native Swift (iOS & Mac) example.
Swift with swift-graphql A native Swift (iOS & Mac) example using swift-graphql.

UI Extensions

We've crafted a few example UI extensions for you to get started with. These should show how to extend the Hygraph UI with your own custom components.

Name Type SDK Description
Quickstart Input React A basic <input /> showing how to use UI extensions.
Cloudinary Input React A custom Cloudinary asset picker.
Focal Point Input JavaScript A custom focal point picker.
Bynder Input JavaScript Browse assets from Bynder using the Compact View V2 component.
Conditional Fields Input TypeScript UI extension to show how to change visibility for other fields and use fieldConfig.

Links

Join our Slack Β· Read the Docs Β· Learn more about Hygraph

Contributing

Do you see something missing above that you're working with? Open a Pull Request with your example, and get it featured in our newsletter! Learn more.

More Repositories

1

gatsby-graphcms-ecommerce-starter

Swag store built with GraphCMS, Stripe, Gatsby, Postmark and Printful.
JavaScript
200
star
2

hygraph-commerce-starter

JavaScript
154
star
3

gatsby-source-graphcms

The official Gatsby source plugin for GraphCMS projects
JavaScript
143
star
4

reference-marketing-website

Next.js starter for creating a SaaS Marketing Website with Hygraph ⚑️
JavaScript
111
star
5

react-image

Universal lazy-loading, auto-compressed images with React and GraphCMS
JavaScript
106
star
6

rich-text

A set of companion packages for Hygraph's Rich Text Field
TypeScript
81
star
7

gatsby-starter-hygraph-blog

Gatsby starter for creating a basic blog with Hygraph
JavaScript
72
star
8

example_01_nextjs_apollo

Demo project using Next.js, Apollo and GraphCMS
JavaScript
59
star
9

docs-starter

Remix starter for creating documentation websites with Hygraph
TypeScript
54
star
10

GraphQL-CMS

⚑️ GraphCMS is a GraphQL based Headless Content Management System
53
star
11

management-sdk

GraphCMS Management SDK
TypeScript
47
star
12

nextjs-graphcms-podcast-starter

Starter project built with GraphCMS, NextJS, and Twilio SendGrid.
JavaScript
43
star
13

hygraph-sveltekit-portfolio-and-blog-starter

Get started with your own portfolio and blog with SvelteKit and Hygraph
Svelte
36
star
14

gatsby-graphcms-example

Example of Gatsby source plugin for GraphCMS
JavaScript
31
star
15

buildyourdxp.com

Build Your DXP is an open-source catalog to explore the best-of-breed services that power today's Digital Experience Platforms, enabling teams to deliver exceptional customer experiences at scale with an API-first micro-services approach.
JavaScript
18
star
16

import-from-csv

A guide on importing content from a CSV file.
JavaScript
18
star
17

example-gatsby-static-dynamic-hotel

JavaScript
16
star
18

gatsby-graphcms-tailwindcss-example

JavaScript
14
star
19

hygraph-nextjs-blog-starter

JavaScript
12
star
20

graphcms-event-app-demo

Listing events from GraphCMS.
JavaScript
8
star
21

nextjs-graphcms-events-starter

JavaScript
8
star
22

status

HTML
8
star
23

sveltekit-hygraph-spacex-starter

Starter project built with GraphCMS, SvelteKit and Tailwind with DaisyUI
Svelte
8
star
24

ui-extensions-examples-with-nextjs

TypeScript
6
star
25

hygraph-astro-microblog-starter

JavaScript
5
star
26

skncre-starter-astro

SKNCRE a Hygraph cosmetics brand demo showcasing Hygraph CMS and Federated content
TypeScript
5
star
27

example_02_simple_data_import

Simple Data Import from JSON file into GraphCMS
JavaScript
5
star
28

gcms-hasura-fit-reference

JavaScript
4
star
29

reference-remote-fields-stripe

JavaScript
4
star
30

GraphQL-Content-API

⚑️ Build a GraphQL Content API in minutes
4
star
31

StageSync

JavaScript
3
star
32

rss-example

A demo of building a simple rss feed using graphcms
TypeScript
3
star
33

hygraph-next-commerce-starter

JavaScript
3
star
34

hygraph-app-nextjs-quick-start

TypeScript
2
star
35

ai-writer-app

AI Writer assistant, powered by GPT-3.
TypeScript
2
star
36

react-scripts

JavaScript
2
star
37

uix-tinymce

Example GraphCMS UI extension integrating the TinyMCE rich text editor
JavaScript
2
star
38

hygraph-implementation-guides

JavaScript
2
star
39

example_03_expo

Demo Project Using GraphCMS and Expo
JavaScript
2
star
40

remix-preview-mode

Preview mode example with Remix and Hygraph
TypeScript
1
star
41

contentlayer-docs-starter

1
star
42

hygraph-utils

JavaScript
1
star
43

relay-pizza-demo

JavaScript
1
star
44

mailergraph

App Framework Example Project
TypeScript
1
star
45

ec

JavaScript
1
star