GraphQL::Plugin::Convert::Test - GraphQL plugin test class
package main; use GraphQL::Plugin::Convert::Test; use GraphQL::Execution qw(execute); my $converted = GraphQL::Plugin::Convert::Test->to_graphql; print execute( $converted->{schema}, '{helloWorld}', $converted->{root_value} )->{data}{helloWorld}, "\n";
Example class to allow testing of convert plugin consumers.
Produces a schema and root value that defines the top-level query field helloWorld. That will return the string Hello, world!.
helloWorld
Hello, world!
Ignores all inputs.
To install GraphQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GraphQL
CPAN shell
perl -MCPAN -e shell install GraphQL
For more information on module installation, please visit the detailed CPAN module installation guide.