PHPackages                             thecodingmachine/graphqlite-misc-types - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. thecodingmachine/graphqlite-misc-types

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

thecodingmachine/graphqlite-misc-types
======================================

A collection of non-standard GraphQL types to be used with GraphQLite.

15.7k↓55%5[1 issues](https://github.com/thecodingmachine/graphqlite-misc-types/issues)[6 PRs](https://github.com/thecodingmachine/graphqlite-misc-types/pulls)PHP

Since Mar 9Pushed 4y ago7 watchersCompare

[ Source](https://github.com/thecodingmachine/graphqlite-misc-types)[ Packagist](https://packagist.org/packages/thecodingmachine/graphqlite-misc-types)[ RSS](/packages/thecodingmachine-graphqlite-misc-types/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (5)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/fe917f8b2baf60a9b7d223875104edc787143605b7ba78082f8c8cebbf5540ff/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d6d6973632d74797065732f762f737461626c65)](https://packagist.org/packages/thecodingmachine/graphqlite-misc-types)[![Total Downloads](https://camo.githubusercontent.com/76b99ccf9225af2797a85d47b9143ae3a351723b91d7bc69158d7f07794745b8/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d6d6973632d74797065732f646f776e6c6f616473)](https://packagist.org/packages/thecodingmachine/graphqlite-misc-types)[![Latest Unstable Version](https://camo.githubusercontent.com/3d1c8ca8afb138840640ac22933219034bad7bfca9ca2bfe153b999a10585a46/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d6d6973632d74797065732f762f756e737461626c65)](https://packagist.org/packages/thecodingmachine/graphqlite-misc-types)[![License](https://camo.githubusercontent.com/9f0295afa980045873537a5bd369a6bcbefa5d5b16cad2f6c915650024084170/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d6d6973632d74797065732f6c6963656e7365)](https://packagist.org/packages/thecodingmachine/graphqlite-misc-types)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/46ae4d1e2cce2ad28c9c140955029ece168160b8f294f6983ee81ef2db215d4b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746865636f64696e676d616368696e652f6772617068716c6974652d6d6973632d74797065732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thecodingmachine/graphqlite-misc-types/?branch=master)[![Build Status](https://camo.githubusercontent.com/4adb7807f1b804694d7f8ba1e7c20d827bad4158ccdf51c5f7a678b2e8553dd9/68747470733a2f2f7472617669732d63692e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d6d6973632d74797065732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/thecodingmachine/graphqlite-misc-types)[![Coverage Status](https://camo.githubusercontent.com/9a379aeaed03be145722ea81c02ed7939bae279f4f7d46104ca04201778d58b7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f746865636f64696e676d616368696e652f6772617068716c6974652d6d6973632d74797065732f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/thecodingmachine/graphqlite-misc-types?branch=master)

GraphQLite miscellaneous types
==============================

[](#graphqlite-miscellaneous-types)

This package is an add-on to the [GraphQLite](http://graphqlite.thecodingmachine.io/) PHP library. It contains a set of GraphQL scalar types that can be added to GraphQLite.

Install
-------

[](#install)

```
$ composer require thecodingmachine/graphqlite-misc-types
```

"Any" scalar type
-----------------

[](#any-scalar-type)

This types adds support for a "AnyScalar" type that can be any of "string", "int", "float" or "bool".

### Usage

[](#usage)

```
/**
 * @Query()
 * @param scalar $scalar
 * @return scalar
 */
public function echoScalar($scalar)
{
    return $scalar;
}
```

Use the "scalar" type-hint in the DocBlock to cast a value to "AnyScalar".

### Registering AnyScalar

[](#registering-anyscalar)

#### Using the SchemaFactory

[](#using-the-schemafactory)

If you are using the `SchemaFactory` to initialize GraphQLite, use this code to add support for `AnyScalar`:

```
$schemaFactory->addRootTypeMapper(new \TheCodingMachine\GraphQLite\Types\AnyScalar\AnyScalarTypeMapper());
```

#### Using the Symfony bundle

[](#using-the-symfony-bundle)

If you are using the Symfony bundle to initialize GraphQLite, register the `AnyScalarTypeMapper` as a service:

```
# config/services.yaml
services:
    TheCodingMachine\GraphQLite\Types\AnyScalar\AnyScalarTypeMapper:
        tags: ['graphql.root_type_mapper']
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

![](https://avatars.githubusercontent.com/u/1847918?v=4)[TheCodingMachine](/maintainers/thecodingmachine)[@thecodingmachine](https://github.com/thecodingmachine)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (15 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/thecodingmachine-graphqlite-misc-types/health.svg)

```
[![Health](https://phpackages.com/badges/thecodingmachine-graphqlite-misc-types/health.svg)](https://phpackages.com/packages/thecodingmachine-graphqlite-misc-types)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
