- Home
- Skills
- Agents & Orchestration
- Graphql Architect (agent)
Graphql Architect (agent)
Graphql Architect (agent): GraphQL schema design, resolver implementation, federation, and performance optimization with DataLoader
$2
Graphql Architect (agent)
Example session with this skill installed
Design a GraphQL schema for a library management system with Books and Authors. I need a query to fetch a book by ID with its author, optimized to prevent N+1 issues using DataLoaders.
- Read your context and instructions
- Compiled the graphql architect agent
I will design a GraphQL schema and resolver strategy for a Book/Author library system using Laravel conventions and DataLoader optimization.
GraphQL Architecture Report
Summary
Proposed a schema for Book and Author types with a specialized resolver implementation using a DataLoader to handle relational fetching efficiently.
Details
type Book {
id: ID!
title: String!
isbn: String
author: Author!
}
type Author {
id: ID!
name: String!
books: [Book!]!
}
type Query {
book(id: ID!): Book
}
// BookResolver.php implementation strategy
public function author(Book $book, array $args, GraphQLContext $context)
{
// Implementation uses BatchLoader to collect author IDs
return $context->loader(AuthorBatchLoader::class)->load($book->author_id);
}
Assumptions
- The
Bookmodel has aauthor_idforeign key. - The project uses a standard DataLoader implementation (like lighthouse-php or a custom deferred resolver).
- Authentication is handled at the middleware layer.
Risks and open questions
- Risk: Deep nesting of
Author -> Books -> Authorcould cause memory pressure if not depth-limited. - Question: Should we include pagination for the
Author.booksfield immediately?
Verification
- Checked against
shared/coding-standards.md: All PHP types are strictly defined. - Checked against
shared/security-guidelines.md: ID-based lookup uses underlying model policy.
Next steps
- Define the
AuthorBatchLoaderclass to handle thecollect()andeager loadlogic. - Implement the Query resolver in the
schema.graphqlfile. - Add a
QueryDepthrule to the GraphQL configuration.
Connects securely to your tools. The creator never sees your data.
About this skill
Poorly structured GraphQL schemas lead to N+1 queries, complex resolvers, and broken federation. This skill provides a systematic architect for Laravel-based GraphQL APIs, ensuring schemas follow strict performance and security standards.
What it does
- Schema Design defines Type definitions and Query/Mutation structures following best practices.
- Resolver Implementation outlines efficient PHP resolver logic tailored for Laravel's Eloquent ORM.
- Performance Optimization integrates DataLoader patterns to eliminate N+1 query issues.
- Federation Strategy plans for distributed graph architectures and service composition.
- Security Auditing applies specific guidelines to prevent depth-based attacks and unauthorized data exposure.
How it works
- Goal Restatement where the agent summarizes your architectural objective to ensure alignment.
- Gap Analysis where missing inputs are identified and specific assumptions are listed.
- Execution Planning to map out the schema and resolver dependencies before writing code.
- Implementation and Validation against project coding standards and security guidelines.
- Structured Reporting using a mandatory template covering summary, details, risks, and verification steps.
Frameworks & tools
This skill is optimized for Laravel and PHP environments. It applies specific standards for Eloquent integration, DataLoader implementations, and GraphQL schema definition language (SDL).
Why this beats prompting it yourself
Generic prompts often hallucinate resolver logic or ignore Laravel-specific conventions. This skill enforces a multi-step verification workflow that lists assumptions explicitly rather than guessing, preventing architectural debt in your API layer.
Use cases
- Drafting a new GraphQL schema for a complex Laravel domain model.
- Refactoring existing resolvers to use DataLoaders for better performance.
- Designing a federated graph architecture for microservices.
- Performing a security and performance audit on an existing GraphQL implementation.
Known limitations
Does not perform live database migrations or destructive file system actions without approval. Requires specific input context regarding the Laravel project structure to provide the most accurate results.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 6 days ago
Permissions
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.