GraphQL::Plugin::Type::DateTime3pm
Graphql datetime scalar type
Usage
use GraphQL::Schema;use GraphQL::Plugin::Type::DateTime;use GraphQL::Execution qw(execute);my $schema = GraphQL::Schema->from_doc(<<'EOF');type Query { dateTimeNow: DateTime }EOFpost '/graphql' => sub {send_as JSON => execute($schema,body_parameters->{query},{ dateTimeNow => sub { DateTime->now } },undef,body_parameters->{variables},body_parameters->{operationName},undef,);};
Overview
Implements a non-standard GraphQL scalar type that represents a point in time, canonically represented in ISO 8601 format, e.g. "20171114T07:41:10".
Releases
Unchanged in 2 releases since Debian 12 (Bookworm).