Skip to content

Commit

Permalink
🔍 Lens v3 (#lens-v3)
Browse files Browse the repository at this point in the history
Summary: Migrated to Lens v3 by removing outdated GraphQL queries and generated TypeScript types.

Highlights:

• Deleted multiple GraphQL query files like `Notifications.graphql` and `Profile.graphql`.
• Removed `UserSigNoncesSubscription.graphql` subscription file.
• Deleted `generated.ts`, which contained TypeScript types for the removed queries.

Read more: https://pierre.co/hey/hey/lens-v3
  • Loading branch information
Yoginth authored and Pierre committed Nov 29, 2024
1 parent 5a809ec commit efb63fb
Show file tree
Hide file tree
Showing 355 changed files with 806 additions and 16,635 deletions.
216 changes: 108 additions & 108 deletions .github/workflows/deploy-docker.yml
Original file line number Diff line number Diff line change
@@ -1,122 +1,122 @@
name: Deploy Docker Images
# name: Deploy Docker Images

env:
API_RAILWAY_SERVICE_ID: 4a2a1bfb-e499-4c71-bf7f-d9ad47443c31
CRON_RAILWAY_SERVICE_ID: 348ba788-3282-4f27-9967-ca04eea9ac4b
OG_RAILWAY_SERVICE_ID: 76d31e4b-218d-4f82-974d-f2c8e91480e2
# env:
# API_RAILWAY_SERVICE_ID: 4a2a1bfb-e499-4c71-bf7f-d9ad47443c31
# CRON_RAILWAY_SERVICE_ID: 348ba788-3282-4f27-9967-ca04eea9ac4b
# OG_RAILWAY_SERVICE_ID: 76d31e4b-218d-4f82-974d-f2c8e91480e2

on:
push:
branches: [main]
workflow_dispatch:
# on:
# push:
# branches: [main]
# workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
api-changed: ${{ steps.filter.outputs.api }}
cron-changed: ${{ steps.filter.outputs.cron }}
og-changed: ${{ steps.filter.outputs.og }}
steps:
- name: Checkout 🚪
uses: actions/checkout@v4
# jobs:
# check-changes:
# runs-on: ubuntu-latest
# outputs:
# api-changed: ${{ steps.filter.outputs.api }}
# cron-changed: ${{ steps.filter.outputs.cron }}
# og-changed: ${{ steps.filter.outputs.og }}
# steps:
# - name: Checkout 🚪
# uses: actions/checkout@v4

- name: Check for changes 🔍
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
api:
- 'apps/api/**'
- 'packages/**'
cron:
- 'apps/cron/**'
- 'packages/**'
og:
- 'apps/og/**'
- 'packages/**'
# - name: Check for changes 🔍
# id: filter
# uses: dorny/paths-filter@v3
# with:
# filters: |
# api:
# - 'apps/api/**'
# - 'packages/**'
# cron:
# - 'apps/cron/**'
# - 'packages/**'
# og:
# - 'apps/og/**'
# - 'packages/**'

api:
needs: check-changes
if: needs.check-changes.outputs.api-changed == 'true'
name: heyxyz/api:latest
runs-on: ubuntu-latest
steps:
- name: Checkout 🚪
uses: actions/checkout@v4
# api:
# needs: check-changes
# if: needs.check-changes.outputs.api-changed == 'true'
# name: heyxyz/api:latest
# runs-on: ubuntu-latest
# steps:
# - name: Checkout 🚪
# uses: actions/checkout@v4

- name: Build and push heyxyz/api:latest 🚀
uses: ./.github/actions/docker
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
image_name: api
tag_name: 'latest'
docker_file: ./apps/api/Dockerfile
# - name: Build and push heyxyz/api:latest 🚀
# uses: ./.github/actions/docker
# with:
# dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
# dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
# image_name: api
# tag_name: 'latest'
# docker_file: ./apps/api/Dockerfile

- name: Trigger API Deployment 🚀
uses: indiesdev/curl@v1
id: deploy
with:
url: 'https://redeploy.heyxyz.workers.dev'
params: '{ "secret": "${{ secrets.SECRET }}", "service": "${{ env.API_RAILWAY_SERVICE_ID }}" }'
method: 'GET'
timeout: 30000
# - name: Trigger API Deployment 🚀
# uses: indiesdev/curl@v1
# id: deploy
# with:
# url: 'https://redeploy.heyxyz.workers.dev'
# params: '{ "secret": "${{ secrets.SECRET }}", "service": "${{ env.API_RAILWAY_SERVICE_ID }}" }'
# method: 'GET'
# timeout: 30000

cron:
needs: check-changes
if: needs.check-changes.outputs.cron-changed == 'true'
name: heyxyz/cron:latest
runs-on: ubuntu-latest
steps:
- name: Checkout 🚪
uses: actions/checkout@v4
# cron:
# needs: check-changes
# if: needs.check-changes.outputs.cron-changed == 'true'
# name: heyxyz/cron:latest
# runs-on: ubuntu-latest
# steps:
# - name: Checkout 🚪
# uses: actions/checkout@v4

- name: Build and push heyxyz/cron:latest 🚀
uses: ./.github/actions/docker
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
image_name: cron
tag_name: 'latest'
docker_file: ./apps/cron/Dockerfile
# - name: Build and push heyxyz/cron:latest 🚀
# uses: ./.github/actions/docker
# with:
# dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
# dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
# image_name: cron
# tag_name: 'latest'
# docker_file: ./apps/cron/Dockerfile

- name: Trigger Cron Deployment 🚀
uses: indiesdev/curl@v1
id: deploy
with:
url: 'https://redeploy.heyxyz.workers.dev'
params: '{ "secret": "${{ secrets.SECRET }}", "service": "${{ env.CRON_RAILWAY_SERVICE_ID }}" }'
method: 'GET'
timeout: 30000
# - name: Trigger Cron Deployment 🚀
# uses: indiesdev/curl@v1
# id: deploy
# with:
# url: 'https://redeploy.heyxyz.workers.dev'
# params: '{ "secret": "${{ secrets.SECRET }}", "service": "${{ env.CRON_RAILWAY_SERVICE_ID }}" }'
# method: 'GET'
# timeout: 30000

og:
needs: check-changes
if: needs.check-changes.outputs.og-changed == 'true'
name: heyxyz/og:latest
runs-on: ubuntu-latest
steps:
- name: Checkout 🚪
uses: actions/checkout@v4
# og:
# needs: check-changes
# if: needs.check-changes.outputs.og-changed == 'true'
# name: heyxyz/og:latest
# runs-on: ubuntu-latest
# steps:
# - name: Checkout 🚪
# uses: actions/checkout@v4

- name: Build and push heyxyz/og:latest 🚀
uses: ./.github/actions/docker
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
image_name: og
tag_name: 'latest'
docker_file: ./apps/og/Dockerfile
# - name: Build and push heyxyz/og:latest 🚀
# uses: ./.github/actions/docker
# with:
# dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
# dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
# image_name: og
# tag_name: 'latest'
# docker_file: ./apps/og/Dockerfile

- name: Trigger OG Deployment 🚀
uses: indiesdev/curl@v1
id: deploy
with:
url: 'https://redeploy.heyxyz.workers.dev'
params: '{ "secret": "${{ secrets.SECRET }}", "service": "${{ env.OG_RAILWAY_SERVICE_ID }}" }'
method: 'GET'
timeout: 30000
# - name: Trigger OG Deployment 🚀
# uses: indiesdev/curl@v1
# id: deploy
# with:
# url: 'https://redeploy.heyxyz.workers.dev'
# params: '{ "secret": "${{ secrets.SECRET }}", "service": "${{ env.OG_RAILWAY_SERVICE_ID }}" }'
# method: 'GET'
# timeout: 30000
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@hey/data": "workspace:*",
"@hey/db": "workspace:*",
"@hey/helpers": "workspace:*",
"@hey/lens": "workspace:*",
"@hey/indexer": "workspace:*",
"@json2csv/plainjs": "^7.0.6",
"@lens-protocol/metadata": "^1.2.0",
"apollo-utilities": "^1.3.4",
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/helpers/getRpc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { POLYGON_AMOY_RPCS, POLYGON_RPCS } from "@hey/data/rpcs";
import { LENS_TESTNET_RPCS, POLYGON_RPCS } from "@hey/data/rpcs";
import type { FallbackTransport } from "viem";
import { http, fallback } from "viem";

Expand All @@ -7,7 +7,7 @@ const getRpc = ({ mainnet }: { mainnet: boolean }): FallbackTransport => {
return fallback(POLYGON_RPCS.map((rpc) => http(rpc)));
}

return fallback(POLYGON_AMOY_RPCS.map((rpc) => http(rpc)));
return fallback(LENS_TESTNET_RPCS.map((rpc) => http(rpc)));
};

export default getRpc;
52 changes: 0 additions & 52 deletions apps/api/src/routes/clubs/get.ts

This file was deleted.

49 changes: 0 additions & 49 deletions apps/api/src/routes/clubs/join.ts

This file was deleted.

Loading

0 comments on commit efb63fb

Please sign in to comment.