.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "GraphQL::Directive 3pm" .TH GraphQL::Directive 3pm "2022-03-27" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" GraphQL::Directive \- GraphQL directive .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 6 \& use GraphQL::Directive; \& my $directive = GraphQL::Directive\->new( \& name => \*(AqObject\*(Aq, \& interfaces => [ $interfaceType ], \& fields => { field_name => { type => $scalar_type, resolve => sub { \*(Aq\*(Aq } }}, \& ); .Ve .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" Has \f(CW\*(C`name\*(C'\fR, \f(CW\*(C`description\*(C'\fR from GraphQL::Role::Named. .SS "locations" .IX Subsection "locations" Array-ref of locations where the directive can occur. Must be one of these strings: .PP .Vb 10 \& QUERY \& MUTATION \& SUBSCRIPTION \& FIELD \& FRAGMENT_DEFINITION \& FRAGMENT_SPREAD \& INLINE_FRAGMENT \& SCHEMA \& SCALAR \& OBJECT \& FIELD_DEFINITION \& ARGUMENT_DEFINITION \& INTERFACE \& UNION \& ENUM \& ENUM_VALUE \& INPUT_OBJECT \& INPUT_FIELD_DEFINITION .Ve .SS "args" .IX Subsection "args" Hash-ref of arguments. See \*(L"FieldMapInput\*(R" in GraphQL::Type::Library. .SH "METHODS" .IX Header "METHODS" .SS "from_ast" .IX Subsection "from_ast" See \*(L"from_ast\*(R" in GraphQL::Type. .SH "PACKAGE VARIABLES" .IX Header "PACKAGE VARIABLES" .ie n .SS "$GraphQL::Directive::DEPRECATED" .el .SS "\f(CW$GraphQL::Directive::DEPRECATED\fP" .IX Subsection "$GraphQL::Directive::DEPRECATED" .ie n .SS "$GraphQL::Directive::INCLUDE" .el .SS "\f(CW$GraphQL::Directive::INCLUDE\fP" .IX Subsection "$GraphQL::Directive::INCLUDE" .ie n .SS "$GraphQL::Directive::SKIP" .el .SS "\f(CW$GraphQL::Directive::SKIP\fP" .IX Subsection "$GraphQL::Directive::SKIP" .ie n .SS "@GraphQL::Directive::SPECIFIED_DIRECTIVES" .el .SS "\f(CW@GraphQL::Directive::SPECIFIED_DIRECTIVES\fP" .IX Subsection "@GraphQL::Directive::SPECIFIED_DIRECTIVES" Not exported. Contains the three GraphQL-specified directives: \f(CW@skip\fR, \&\f(CW@include\fR, \f(CW@deprecated\fR, each of which are available with the variables above. Use if you want to have these plus your own directives in your schema: .PP .Vb 4 \& my $schema = GraphQL::Schema\->new( \& # ... \& directives => [ @GraphQL::Directive::SPECIFIED_DIRECTIVES, $my_directive ], \& ); .Ve