Skip to content

Commit

Permalink
Enabled the module "GraphQL Compose Routes" module as we want to be
Browse files Browse the repository at this point in the history
able to query nodes based on their url rather than their UUID's.

Enabled route querying for the GO content types "GO Page" and "GO Category Page".
  • Loading branch information
Dresse committed Jan 14, 2025
1 parent 7396d9c commit bf59a00
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ module:
gin_toolbar: 0
graphql: 0
graphql_compose: 0
graphql_compose_routes: 0
handy_cache_tags: 0
health_check: 0
honeypot: 0
Expand Down
2 changes: 2 additions & 0 deletions config/sync/graphql_compose.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ entity_config:
go_category_page:
enabled: true
query_load_enabled: true
routes_enabled: true
go_page:
enabled: true
query_load_enabled: true
routes_enabled: true
page:
enabled: false
paragraph:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use Drupal\Core\Field\FieldItemInterface;
use Drupal\graphql\GraphQL\Execution\FieldContext;
use Drupal\graphql_compose\Plugin\GraphQL\DataProducer\FieldProducerItemInterface;
use Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeFieldTypeBase;
use Drupal\graphql_compose\Plugin\GraphQL\DataProducer\FieldProducerTrait;
use Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeFieldTypeBase;

/**
* {@inheritDoc}
Expand All @@ -18,7 +18,7 @@
* type_sdl = "Color",
* )
*/
class ColorItem extends GraphQLComposeFieldTypeBase implements FieldProducerItemInterface{
class ColorItem extends GraphQLComposeFieldTypeBase implements FieldProducerItemInterface {

use FieldProducerTrait;

Expand All @@ -28,8 +28,8 @@ class ColorItem extends GraphQLComposeFieldTypeBase implements FieldProducerItem
public function resolveFieldItem(FieldItemInterface $item, FieldContext $context) {

return [
'color' => $item->color,
'opacity' => $item->opacity
'color' => isset($item->color),
'opacity' => isset($item->opacity),
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class ColorType extends GraphQLComposeSchemaTypeBase {

/**
* @inheritDoc
* {@inheritdoc}
*/
public function getTypes(): array {
$types = [];
Expand Down

0 comments on commit bf59a00

Please sign in to comment.