PHPackages                             le0daniel/graphql-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. le0daniel/graphql-tools

ActivePackage[API Development](/categories/api)

le0daniel/graphql-tools
=======================

Tools for using endpoints in PHP graphql applications based on webonyx/graphql-php

v6.0.1(2y ago)390MITPHPPHP ^8.2

Since May 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/le0daniel/graphql-tools)[ Packagist](https://packagist.org/packages/le0daniel/graphql-tools)[ RSS](/packages/le0daniel-graphql-tools/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (18)Used By (0)

GraphQl Tools
=============

[](#graphql-tools)

[![Latest Stable Version](https://camo.githubusercontent.com/84b41b9af37d3fd8f47ff2f400ac09a9fe232f7ceee0b3b2051250577b8c1e4d/68747470733a2f2f706f7365722e707567782e6f72672f6c653064616e69656c2f6772617068716c2d746f6f6c732f76)](//packagist.org/packages/le0daniel/graphql-tools) [![Total Downloads](https://camo.githubusercontent.com/c58ca968322e29048a376bec71ab4044ac7b4c6112750fe4a686807ef0c69300/68747470733a2f2f706f7365722e707567782e6f72672f6c653064616e69656c2f6772617068716c2d746f6f6c732f646f776e6c6f616473)](//packagist.org/packages/le0daniel/graphql-tools) [![License](https://camo.githubusercontent.com/cf7a28c3ac3d8db226a92c9cf1a3a966a5d8079e0c39e8093b3971ae243c0e37/68747470733a2f2f706f7365722e707567782e6f72672f6c653064616e69656c2f6772617068716c2d746f6f6c732f6c6963656e7365)](//packagist.org/packages/le0daniel/graphql-tools)

This is a simple opinionated toolkit for writing scalable code first GraphQL applications in PHP.

Main Features

- Custom extensions support (Tracing, Telemetry of resolvers)
- Support for middlewares of resolvers
- Abstraction for schema registration and multi schema supports. This is similar to the visible function, but more transparent.
- Abstract classes to extend for defining types / enums / interfaces / unions / scalars
- Fields are built with the easy-to-use field builder
- Simple dataloader implementation to solve N+1 problems
- Code First approach to schema building
- Schema Stitching: Extending of Types with additional fields, allowing you to respect your domain boundires and construct the right dependency directions in your code.
- Type name aliases, so that you can either use type names of class names of types.
- Lazy by default for best performance
- Support for @defer for PHP using generators.

Installation
------------

[](#installation)

Install via composer

```
composer require le0daniel/graphql-tools

```

Basic Usage
-----------

[](#basic-usage)

The usage is similar to how you would use `webonyx/graphql` and define object types. Instead of extending the default classes, you extend the abstract classes provided. Every resolve function is wrapped by the ProxyResolver class, which provides support for extensions.

At the core, we start with a schema registry. There you register types and register extensions to types.

```
