Building GraphQL APIs
Prerequisites
Steps to Create an GraphQL API Endpoint
1. Add GraphQL API Resource to studio.yaml
name: Router Nitro
description: Indexing cross chain transfers on router nitro protocol
userId: xxxx-xxxx-xxxx
projectId: xxxx
user: prady
schema:
file: ./studio.schema.ts
Resources:
Name: tranasctions
Type: api/graphql
Slug: test
Handlers:
resolver: src/handlers/resolver.transactionResolvers
typedefs: src/handlers/typedef.transactionTypeDefs2. Generate Boilerplate Code
3. Implement GraphQL API Logic
4. Using ABind for Database Operations
5. Testing the GraphQL API
6. Deploying the API
Last updated