GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GraphQL::Type::Union(3) User Contributed Perl Documentation GraphQL::Type::Union(3)

GraphQL::Type::Union - GraphQL union type

  use GraphQL::Type::Union;
  my $union_type = GraphQL::Type::Union->new(
    name => 'Union',
    types => [ $type1, $type2 ],
    resolve_type => sub {
      return $type1 if ref $_[0] eq 'Type1';
      return $type2 if ref $_[0] eq 'Type2';
    },
  );

Inherits "name", "description" from GraphQL::Type.

Thunked array-ref of GraphQL::Type::Object objects.

Optional code-ref. Input is a value, returns a GraphQL type object for it. If not given, relies on its possible type objects having a provided "is_type_of".

Returns list of GraphQL::Type::Objects of which the object is a union, performing validation.
2021-07-04 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.