GraphQL\Examples\Blog\Type\NodeType::resolveNodeType PHP Method

resolveNodeType() public method

public resolveNodeType ( $object )
    public function resolveNodeType($object)
    {
        if ($object instanceof User) {
            return Types::user();
        } else {
            if ($object instanceof Image) {
                return Types::image();
            } else {
                if ($object instanceof Story) {
                    return Types::story();
                }
            }
        }
    }