Download the PHP package freshcells/graphqlite-misc-types without Composer
On this page you can find all versions of the php package freshcells/graphqlite-misc-types. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download freshcells/graphqlite-misc-types
More information about freshcells/graphqlite-misc-types
Files in freshcells/graphqlite-misc-types
Package graphqlite-misc-types
Short Description A collection of non-standard GraphQL types to be used with GraphQLite.
License MIT
Homepage https://github.com/freshcells/graphqlite-misc-types
Informations about the package graphqlite-misc-types
GraphQLite miscellaneous types
This package is an add-on to the GraphQLite PHP library. It contains a set of GraphQL scalar types that can be added to GraphQLite.
This is a takeover drop-in fork of https://github.com/thecodingmachine/graphqlite-misc-types which seems to be abandoned.
We left the namespace as TheCodingMachine
to assure drop-in replacement.
Install
"Any" scalar type
This types adds support for a "AnyScalar" type that can be any of "string", "int", "float" or "bool".
Usage
Use the "scalar" type-hint in the DocBlock to cast a value to "AnyScalar".
Registering AnyScalar
Using the SchemaFactory
If you are using the SchemaFactory
to initialize GraphQLite, use this code to add support for AnyScalar
:
Using the Symfony bundle
If you are using the Symfony bundle to initialize GraphQLite, register the AnyScalarTypeMapper
as a service:
"JSON" type
This type adds support for a "JSON" type that can be used to represent JSON data.
Using the Symfony bundle
If you are using the Symfony bundle to initialize GraphQLite, register the JSONScalarTypeMapperFactory
as a service:
All versions of graphqlite-misc-types with dependencies
thecodingmachine/graphqlite Version ^5 || ^6
webonyx/graphql-php Version ^14.9