Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extracting label option from object #1605

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

elistone
Copy link
Member

@elistone elistone commented Jan 3, 2025

Package(s) involved

  • packages/composer/amazeelabs/graphql_directives

Description of changes

Checking if a "string" is an "object" to help prevent throwing errors when trying to convert to string.

Motivation and context

After adding taxonomy filters to sliverback template, errors were being thrown as it tried to get "label", checking if is object first prevents this problem.

The error I was getting:

For error #0: Error: Object of class stdClass could not be converted to string in Drupal\graphql_directives\Plugin\GraphQL\DataProducer\DrupalView->Drupal\graphql_directives\Plugin\GraphQL\DataProducer\{closure}() (line 104 of template/apps/cms/web/modules/contrib/graphql_directives/src/Plugin/GraphQL/DataProducer/DrupalView.php

Related Issue(s)

https://amazeelabs.atlassian.net/browse/SLB-512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant