-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor de l'indexation de Meetup avec GraphQL (#1592)
closes #1499
- Loading branch information
Showing
17 changed files
with
515 additions
and
524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class MeetupEmojis extends AbstractMigration | ||
{ | ||
public function change(): void | ||
{ | ||
$this->execute("ALTER TABLE afup_meetup CHANGE description description text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;"); | ||
$this->execute("ALTER TABLE afup_meetup CHANGE title title varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AppBundle\Indexation\Meetups\GraphQL; | ||
|
||
/** | ||
* @readonly | ||
*/ | ||
final class Edge | ||
{ | ||
public Node $node; | ||
|
||
public function __construct(Node $node) | ||
{ | ||
$this->node = $node; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AppBundle\Indexation\Meetups\GraphQL; | ||
|
||
/** | ||
* @readonly | ||
*/ | ||
final class Events | ||
{ | ||
/** @var list<Edge> */ | ||
public array $edges; | ||
|
||
/** | ||
* @param list<Edge> $edges | ||
*/ | ||
public function __construct(array $edges) | ||
{ | ||
$this->edges = $edges; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AppBundle\Indexation\Meetups\GraphQL; | ||
|
||
/** | ||
* @readonly | ||
*/ | ||
final class Group | ||
{ | ||
public Events $upcomingEvents; | ||
public Events $pastEvents; | ||
|
||
public function __construct(Events $upcomingEvents, Events $pastEvents) | ||
{ | ||
$this->upcomingEvents = $upcomingEvents; | ||
$this->pastEvents = $pastEvents; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AppBundle\Indexation\Meetups\GraphQL; | ||
|
||
use DateTime; | ||
|
||
/** | ||
* @readonly | ||
*/ | ||
final class Node | ||
{ | ||
public string $id; | ||
public string $title; | ||
public string $description; | ||
public DateTime $dateTime; | ||
public ?Venue $venue; | ||
|
||
public function __construct(string $id, string $title, string $description, DateTime $dateTime, ?Venue $venue) | ||
{ | ||
$this->id = $id; | ||
$this->title = $title; | ||
$this->description = $description; | ||
$this->dateTime = $dateTime; | ||
$this->venue = $venue; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
sources/AppBundle/Indexation/Meetups/GraphQL/QueryGroupsResponse.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AppBundle\Indexation\Meetups\GraphQL; | ||
|
||
/** | ||
* @readonly | ||
*/ | ||
final class QueryGroupsResponse | ||
{ | ||
/** @var array<string, Group> */ | ||
public array $data; | ||
|
||
/** | ||
* @param array<string, Group> $data | ||
*/ | ||
public function __construct(array $data) | ||
{ | ||
$this->data = $data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AppBundle\Indexation\Meetups\GraphQL; | ||
|
||
/** | ||
* @readonly | ||
*/ | ||
final class Venue | ||
{ | ||
public string $name; | ||
|
||
public function __construct(string $name) | ||
{ | ||
$this->name = $name; | ||
} | ||
} |
Oops, something went wrong.