Skip to content

GraphQL

GraphQL #234

Workflow file for this run

name: GraphQL
on:
workflow_dispatch:
inputs:
url:
description: "Update GraphQL Schema"
required: true
default: "https://api.thegraph.com/subgraphs/name/lightdotso/mainnet"
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.sha }}${{ inputs.url }}
cancel-in-progress: true
jobs:
graphql-update-schema:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Fetch Head
uses: actions/checkout@v4
- name: Node Install
uses: wallet-rs/wallet-rs/.github/actions/node-install@main
- if: github.event_name == 'workflow_dispatch'
name: Run Introspection Dispatch
uses: obmarg/action-graphql-introspect@main
with:
server-url: ${{ github.event.inputs.url }}
output-file: crates/graphql/schemas/graph.graphql
- if: github.event_name == 'schedule'
name: Run Introspection Schedule
uses: obmarg/action-graphql-introspect@main
with:
server-url: "https://api.thegraph.com/subgraphs/name/lightdotso/mainnet"
output-file: crates/graphql/schemas/graph.graphql
- name: Run Fix
run: |
pnpm run fix
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.BOT_TOKEN }}
commit-message: "chore: Update GraphQL Schema"
branch: graphql-schema-updates
title: "chore: Update GraphQL Schema"