The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

GraphQL::Type::Interface - GraphQL interface type

SYNOPSIS

use GraphQL::Type::Interface;
my $ImplementingType;
my $InterfaceType = GraphQL::Type::Interface->new(
  name => 'Interface',
  fields => { field_name => { type => $scalar_type } },
  resolve_type => sub {
    return $ImplementingType;
  },
);

ATTRIBUTES

Has name, description from GraphQL::Role::Named. Has fields from GraphQL::Role::FieldsOutput.

resolve_type

Optional code-ref to resolve types.