marqant-lab / graphql-custom-scalars
包含GraphQL自定义标量类型的包。
v0.0.1
2020-12-21 11:09 UTC
Requires
- illuminate/support: ^6.0|^7.0|^8.0
- nuwave/lighthouse: ^4.13
This package is auto-updated.
Last update: 2024-09-21 19:21:58 UTC
README
描述
此包包含GraphQL自定义标量类型。
可用类型
- DateTime:将日期格式化为ISO8601。
安装
通过composer安装此包。
composer require marqant-lab/graphql-custom-scalars
之后,您需要导入graphql模式。
为此,请将以下行添加到您的graphql/schema.graphql
或graphql/modules.graphql
#import ../vendor/marqant-lab/graphql-custom-scalars/graphql/*.graphql
测试
如果您需要在项目中对此包进行测试,您可以将其添加到您的phpunit.xml
<testsuite name="MarqantGraphQLDateTimeScalar"> <directory suffix="Test.php">./vendor/marqant-lab/graphql-custom-scalars/tests</directory> </testsuite>