graphql-backend

Standardize Laravel Lighthouse GraphQL schema, directives, resolvers, and frontend sync workflows.

6|Updated Jan 24, 2025
One-click install
npx skills add https://github.com/Liinkiing/larastack --skill graphql-backend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphql-backend
Source: https://github.com/Liinkiing/larastack/tree/main/.agents/skills/graphql-backend
Command: npx skills add https://github.com/Liinkiing/larastack --skill graphql-backend

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill standardizes Laravel Lighthouse GraphQL backend conventions for schema, directives, resolvers, and schema sync in backend/. Use when editing backend GraphQL schema or resolver classes.

Core Features & Use Cases

  • Schema organization: Clear guidance for structuring backend/graphql folders, including schema.graphql, types, and resolvers.
  • Directive usage: Standardizes common GraphQL directives (e.g. @globalId, @rename, @guard, @auth) to ensure consistency.
  • Resolver guidelines: Guidance on placing resolvers in App\GraphQL\Queries and App\GraphQL\Mutations, with invokable classes and naming conventions.
  • Schema Sync workflow: After changes, run the documented commands to dump the GraphQL schema to the frontend and refresh the client.

Quick Start

Apply the conventions to your backend GraphQL files under backend/graphql and App\GraphQL\Resolvers. After edits, run the schema dump to update the frontend as described in the guidelines.

Frequently Asked Questions about graphql-backend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Laravel Lighthouse GraphQL schema and resolvers?

To standardize Laravel Lighthouse GraphQL conventions, organize schemas under backend/graphql and place resolvers in App\GraphQL\Queries and App\GraphQL\Mutations as invokable classes. This ensures clear folder structure and consistent naming conventions across your backend.

What directives should I use for Laravel Lighthouse GraphQL authentication?

For Laravel Lighthouse GraphQL authentication, use standard directives like @guard and @auth to enforce consistent access control. Apply @globalId and @rename to maintain uniform schema field handling and ensure reliable directive usage across your backend.

How do I sync a backend GraphQL schema with the frontend client?

To sync a backend GraphQL schema with the frontend client, run the documented schema dump commands after making backend edits. This workflow dumps the Laravel Lighthouse schema to the frontend and refreshes the client to ensure frontend-schema synchronization.

Does this GraphQL backend convention guide require any specific Laravel dependencies?

This GraphQL backend convention guide requires no additional dependencies. It provides standardization guidelines for projects already using Laravel Lighthouse, focusing on schema organization, directive usage, and resolver placement without needing external packages.

When should I document fields in a Laravel Lighthouse GraphQL schema?

You should document fields in a Laravel Lighthouse GraphQL schema whenever you define or modify them in backend/graphql. The conventions enforce field documentation to maintain clear API contracts and ensure frontend-schema synchronization after dumping.