Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflare Workers API with Hono and GraphQL Yoga

A modern API built using Cloudflare Workers, Hono framework, and GraphQL Yoga. This project provides a scalable and efficient way to create serverless APIs with GraphQL support.

🚀 Features

  • Facebook Page information retrieval
  • Detailed page statistics (followers, follows, media counts)
  • Media posts with engagement metrics
  • Stories with performance analytics
  • Built on serverless architecture

📊 Schema

Main Types

FbPage

  • Basic page information
  • Links to detailed page data

PageDetail

  • Comprehensive page statistics
  • Profile information
  • Media collection
  • Stories collection

Media

  • Post details
  • Engagement metrics (likes, comments, shares)
  • Performance metrics (reach, saves)
  • Media content information

Story

  • Story content
  • Engagement metrics
  • Performance analytics

🔍 Queries

🚀 Technologies

🛠️ Getting Started

Prerequisites

  • Node.js (v16 or later)
  • Cloudflare account
  • Wrangler CLI

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/your-project-name.git
cd your-project-name
  1. Install dependencies:
npm install
  1. Configure Wrangler: Create or modify wrangler.toml with your project settings.

  2. Start the development server:

npm run dev
  1. Deploy to Cloudflare Workers:
npm run deploy
  1. Create info.ts

export const TOKEN = "your_facebook_graph_api_token"

export const URL = "https://graph.facebook.com/v21.0"

📁 Project Structure

├── src/
│ ├── index.ts # Main application entry
│ ├── graphql/
│ │ ├── type.ts # GraphQL type definitions
│ │ └── resolver.ts # GraphQL resolvers
│ └── ...
├── wrangler.toml # Cloudflare Workers configuration
└── package.json

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages