logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

GraphQL::Plugin::Type::DateTime - GraphQL DateTime scalar type

Description

       Implements a non-standard GraphQL scalar type that represents a point in time, canonically represented in
       ISO 8601 format, e.g. "20171114T07:41:10".

perl v5.34.0                                       2022-03-27               GraphQL::Plugin::Type::DateTime(3pm)

Name

       GraphQL::Plugin::Type::DateTime - GraphQL DateTime scalar type

Synopsis

         use GraphQL::Schema;
         use GraphQL::Plugin::Type::DateTime;
         use GraphQL::Execution qw(execute);
         my $schema = GraphQL::Schema->from_doc(<<'EOF');
         type Query { dateTimeNow: DateTime }
         EOF
         post '/graphql' => sub {
           send_as JSON => execute(
             $schema,
             body_parameters->{query},
             { dateTimeNow => sub { DateTime->now } },
             undef,
             body_parameters->{variables},
             body_parameters->{operationName},
             undef,
           );
         };

See Also