GraphQL-Client

 view release on metacpan or  search on metacpan

bin/graphql  view on Meta::CPAN


our $VERSION = '0.605'; # VERSION

GraphQL::Client::CLI->main(@ARGV);

__END__

=pod

=encoding UTF-8

=head1 NAME

graphql - Command-line GraphQL client

=head1 VERSION

version 0.605

=head1 SYNOPSIS

    graphql <URL> <QUERY> [ [--variables JSON] | [--variable KEY=VALUE]... ]
            [--operation-name NAME] [--transport KEY=VALUE]...
            [--[no-]unpack] [--filter JSONPATH]
            [--format json|json:pretty|yaml|perl|csv|tsv|table] [--output FILE]

    graphql --version|--help|--manual

=head1 DESCRIPTION

C<graphql> is a command-line program for executing queries and mutations on
a L<GraphQL|https://graphql.org/> server.

=head1 INSTALL

There are several ways to install F<graphql> to your system.

=head2 from CPAN

You can install F<graphql> using L<cpanm>:

    cpanm GraphQL::Client

=head2 from GitHub

You can also choose to download F<graphql> as a self-contained executable:

    curl -OL https://raw.githubusercontent.com/chazmcgarvey/graphql-client/solo/graphql
    chmod +x graphql

To hack on the code, clone the repo instead:

    git clone https://github.com/chazmcgarvey/graphql-client.git
    cd graphql-client
    make bootstrap      # installs dependencies; requires cpanm

=head1 OPTIONS

=head2 C<--url URL>

The URL of the GraphQL server endpoint.

If no C<--url> option is given, the first argument is assumed to be the URL.

This option is required.

Alias: C<-u>

=head2 C<--query STR>

The query or mutation to execute.

If no C<--query> option is given, the next argument (after URL) is assumed to be the query.

If the value is "-" (which is the default), the query will be read from C<STDIN>.

See: L<https://graphql.org/learn/queries/>

Alias: C<--mutation>

=head2 C<--variables JSON>

Provide the variables as a JSON object.

Aliases: C<--vars>, C<-V>

=head2 C<--variable KEY=VALUE>

An alternative way to provide variables one at a time. This option can be repeated to provide
multiple variables.

If used in combination with L</"--variables JSON">, this option is silently ignored.

See: L<https://graphql.org/learn/queries/#variables>

Aliases: C<--var>, C<-d>

=head2 C<--operation-name NAME>

Inform the server which query/mutation to execute.

Alias: C<-n>

=head2 C<--output FILE>

Write the response to a file instead of STDOUT.

Alias: C<-o>

=head2 C<--transport KEY=VALUE>

Key-value pairs for configuring the transport (usually HTTP).

Alias: C<-t>

=head2 C<--format STR>

Specify the output format to use. See L</FORMAT>.

Alias: C<-f>



( run in 0.573 second using v1.01-cache-2.11-cpan-140bd7fdf52 )