Download the PHP package mathsgod/array_to_gql without Composer
On this page you can find all versions of the php package mathsgod/array_to_gql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mathsgod/array_to_gql
More information about mathsgod/array_to_gql
Files in mathsgod/array_to_gql
Download mathsgod/array_to_gql
More information about mathsgod/array_to_gql
Files in mathsgod/array_to_gql
Vendor mathsgod
Package array_to_gql
Short Description A PHP library for converting PHP arrays to GraphQL query syntax with support for parameters, aliases, and nested structures
License MIT
Package array_to_gql
Short Description A PHP library for converting PHP arrays to GraphQL query syntax with support for parameters, aliases, and nested structures
License MIT
Please rate this library. Is it a good library?
Informations about the package array_to_gql
Array to GraphQL
A PHP library for converting PHP arrays to GraphQL query syntax.
Features
- 🔧 Basic Queries: Support for simple field selection
- 📊 Nested Queries: Support for multi-level nested array structures
- 🎯 Parameterized Queries: Use
__args
to add query parameters - 🏷️ Alias Queries: Use
__aliasFor
to create GraphQL aliases - 🎨 Object Parameters: Support for complex nested object parameters
- ✅ Boolean Fields:
true
values display as field selection,false
values are ignored - 🎯 Value Processing: All non-
false
values (strings, numbers,true
) only display key names, not values - 🔒 Character Escaping: Automatic handling of special character escaping
Installation
Usage
Basic Usage
Value Processing Rules
Parameterized Queries
Alias Queries
Complex Nested Queries
Running Tests
Test Coverage
Current tests cover:
- ✅ Basic field selection
- ✅ Nested array structures
- ✅ Boolean value fields
- ✅ Simple and complex parameters
- ✅ Object parameters (multi-level nesting)
- ✅ Alias functionality
- ✅ Alias with parameter combinations
- ✅ Special character escaping
- ✅ Empty array handling
- ✅ Mixed value types
API Reference
array_to_gql($array): string
Converts a PHP array to a GraphQL query string.
Special Keys
__args
: Define query parameters__aliasFor
: Define field alias
Parameters
$array
(array): The PHP array to convert
Return Value
string
: GraphQL query string
License
MIT License
All versions of array_to_gql with dependencies
PHP Build Version
Package Version
No informations.
The package mathsgod/array_to_gql contains the following files
Loading the files please wait ....