GraphQL\Examples\Blog\Types::image PHP Method

image() public static method

public static image ( ) : ImageType
return GraphQL\Examples\Blog\Type\ImageType
    public static function image()
    {
        return self::$image ?: (self::$image = new ImageType());
    }

Usage Example

Esempio n. 1
0
 public function resolveType($object, Types $types)
 {
     if ($object instanceof User) {
         return Types::user();
     } else {
         if ($object instanceof Image) {
             return Types::image();
         } else {
             if ($object instanceof Story) {
                 return Types::story();
             }
         }
     }
 }
All Usage Examples Of GraphQL\Examples\Blog\Types::image