mathsgod/graphqlite-mixed-type

mixed type for graphqlite

Installs: 9 197

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/mathsgod/graphqlite-mixed-type

2.3.0 2025-02-07 04:54 UTC

This package is auto-updated.

Last update: 2025-10-07 06:25:53 UTC


README

PHP Composer

graphqlite-mixed-type

input and output mixed type for thecodingmachine/graphqlite

Setup

$factory = new SchemaFactory($cache, $container);
//...
$factory->addRootTypeMapperFactory(new MixedTypeMapperFactory);

Example

class Controllers{
    
    /**
     * @param mixed $a
     */
    #[Query(outputType: "mixed")]
    public function mixedInput($a)
    {
        return $a;
    }
}
query {
    mixedInput(a:{hello:"world"})
}

It will output

{
  "data": {
    "mixedInput": {
      "hello": "world"
    }
  }
}