PHPackages                             phpnomad/webonyx-integration - 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. phpnomad/webonyx-integration

ActiveLibrary[API Development](/categories/api)

phpnomad/webonyx-integration
============================

webonyx/graphql-php integration for the PHPNomad GraphQL layer

v1.1.0(2mo ago)0335MITPHPPHP &gt;=8.2CI failing

Since Mar 3Pushed 2mo agoCompare

[ Source](https://github.com/phpnomad/webonyx-integration)[ Packagist](https://packagist.org/packages/phpnomad/webonyx-integration)[ Docs](https://github.com/phpnomad/core)[ RSS](/packages/phpnomad-webonyx-integration/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

phpnomad/webonyx-integration
============================

[](#phpnomadwebonyx-integration)

[![Latest Version](https://camo.githubusercontent.com/b656c2262095dcb13872b1b1779e57ab7c446458c3e864eb511bde0cba655467/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068706e6f6d61642f7765626f6e79782d696e746567726174696f6e2e737667)](https://packagist.org/packages/phpnomad/webonyx-integration)[![Total Downloads](https://camo.githubusercontent.com/a22e128eb5648ebcba7e2464df79c33cbc004e499306360b8bc8c636d63053f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068706e6f6d61642f7765626f6e79782d696e746567726174696f6e2e737667)](https://packagist.org/packages/phpnomad/webonyx-integration)[![PHP Version](https://camo.githubusercontent.com/f51889cbecc4b83f9c7068905e42b186796514a9994ea38f6d4f1265e106af62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068706e6f6d61642f7765626f6e79782d696e746567726174696f6e2e737667)](https://packagist.org/packages/phpnomad/webonyx-integration)[![License](https://camo.githubusercontent.com/45983f4b9ad1eb8c8cd224e8edfd6d0a764bd847cf891909fe1f4abd8beca008/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068706e6f6d61642f7765626f6e79782d696e746567726174696f6e2e737667)](https://packagist.org/packages/phpnomad/webonyx-integration)

Integrates [`webonyx/graphql-php`](https://github.com/webonyx/graphql-php) with PHPNomad's GraphQL layer. Provides the concrete `GraphQLStrategy` that `phpnomad/graphql` declares as an abstraction, so applications can serve GraphQL queries through the webonyx engine without binding their resolvers to it.

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

[](#installation)

```
composer require phpnomad/webonyx-integration
```

What This Provides
------------------

[](#what-this-provides)

- `WebonyxGraphQLStrategy` implements `GraphQLStrategy` from `phpnomad/graphql`. It stitches together SDL fragments and resolver maps contributed by registered `TypeDefinition`s, builds one webonyx `Schema`, and executes queries through `GraphQL::executeQuery()`.
- Resolver classes are resolved out of a `phpnomad/di` `InstanceProvider`, so a `FieldResolver` can depend on datastores, services, or any other bound class through normal constructor injection. The schema is built lazily on the first `execute()` call and rebuilt when a new type definition is registered.

Requirements
------------

[](#requirements)

- PHP 8.2+
- `phpnomad/graphql`
- `phpnomad/di`
- `webonyx/graphql-php` ^15.0

Usage
-----

[](#usage)

Bind `WebonyxGraphQLStrategy` to the `GraphQLStrategy` interface in your container, then register a `TypeDefinition` for each slice of your schema.

```
