Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (15 sloc) 393 Bytes
use strict; use warnings;
package DemoApp;
use Dancer2;
use GraphQL::Schema;
use Dancer2::Plugin::GraphQL;
set charset => 'UTF-8';
set template => 'simple';
set plugins => { 'GraphQL' => { graphiql => 1 } }; # equivalent of config file
get '/' => sub {
send_as html => template 'index', {
title => 'Perl-GraphQL demo app',
};
};
graphql '/graphql' => [ 'Test' ];
1;