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(3) User Contributed Perl Documentation GraphQL::Type(3)

GraphQL::Type - GraphQL type object

    extends qw(GraphQL::Type);

Superclass for other GraphQL type classes to inherit from.

Those Perl classes each implement a GraphQL type. Each item of GraphQL data has a GraphQL type. Such an item of data can also be represented within Perl. Objects of that Perl class take responsibility for translating between the Perl representation and the "GraphQL representation". A "GraphQL representation" means something JSON-encodeable: an "object" (in Perl terms, a hash), an array (Perl: array-reference), string, number, boolean, or null.

See "METHODS" for generic methods to translate back and forth between these worlds.

Code that you provide to do this translation must return things that can be JSON-encoded, not things that have been so encoded: this means, among other things, do not surround strings in """, and for boolean values, use the mechanism in JSON::MaybeXS: "JSON-"true> etc.

These subclasses implement part of the GraphQL language specification. Objects of these classes implement user-defined types used to implement a GraphQL API.
GraphQL::Type::Enum
GraphQL::Type::InputObject
GraphQL::Type::Interface
GraphQL::Type::List
GraphQL::Type::NonNull
GraphQL::Type::Object
GraphQL::Type::Scalar - also implements example types such as "String"
GraphQL::Type::Union

These roles implement part of the GraphQL language specification. They are applied to objects of GraphQL::Type classes, either to facilitate type constrants, or as noted below.
GraphQL::Role::FieldsInput - provides "fields" attribute for an input type
GraphQL::Role::FieldsOutput - provides "fields" attribute for an output type
GraphQL::Role::Abstract - abstract type
GraphQL::Role::Composite - type has fields
GraphQL::Role::Input - type can be an input
GraphQL::Role::Leaf - simple type - enum or scalar
GraphQL::Role::Listable - can be list-wrapped; provides convenience method
GraphQL::Role::Named - has a "name" and "description", provided by this role
GraphQL::Role::Nullable - can be null-valued
GraphQL::Role::Output - type can be an output

GraphQL::Type::Library - implements various Type::Tiny type constraints, for use in Moo attributes, and Function::Parameters/Return::Type methods and functions.

Turn given Perl entity into valid Perl value for this type if possible.

Turn given GraphQL entity into Perl entity.

Turn given Perl entity into GraphQL entity.

Class method. $name2type is a hash-ref populated by "from_ast" in GraphQL::Schema. Takes a hash-ref node from an AST made by "parse" in GraphQL::Language::Parser. Returns a type object.

Returns Schema Definition Language (SDL) document that describes this object.
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.