Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GraphQL::Plugin::ConveUserTContributed Perl DGraphQL::Plugin::Convert::Test(3)

NAME
       GraphQL::Plugin::Convert::Test -	GraphQL	plugin test class

SYNOPSIS
	 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";

	 # show	schema from shell
	 perl -Maliased=GraphQL::Plugin::Convert::Test -e 'print Test->to_graphql->{schema}->to_doc'

DESCRIPTION
       Example class to	allow testing of convert plugin	consumers.

METHODS
       Produces	a schema and root value	that defines the top-level query field
       "helloWorld". That will return the string "Hello, world!".

       Also has	a mutation, "echo", that takes a String	"s", and returns it.

   to_graphql(@values)
       If the first value is true, it is a "subscribe_resolver", enabling
       subscriptions in	the generated schema.  It will be returned as the
       relevant	key in the hash-ref, suitable for being	passed as the relevant
       arg to "subscribe" in GraphQL::Subscription.  The schema	will have a
       subscription field "timedEcho" that takes a String "s", and should
       return it periodically, in a way	determined by the subscription
       function.

perl v5.32.1			  2021-02-02 GraphQL::Plugin::Convert::Test(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=GraphQL::Plugin::Convert::Test&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help