Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
graphql_compose
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
graphql_compose
Commits
d893bb10
Commit
d893bb10
authored
1 month ago
by
Vikas Shishodia
Browse files
Options
Downloads
Plain Diff
Merge branch '3507357-Fix-link-field-issue' into '2.4.x'
Issue
#3507357
: Fixing error with link field with limited cardinality. See merge request
!111
parents
3b990890
cd2c9a8d
No related branches found
No related tags found
No related merge requests found
Pipeline
#489658
passed
1 month ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/GraphQL/DataProducer/FieldProducerPlugin.php
+6
-1
6 additions, 1 deletion
src/Plugin/GraphQL/DataProducer/FieldProducerPlugin.php
with
6 additions
and
1 deletion
src/Plugin/GraphQL/DataProducer/FieldProducerPlugin.php
+
6
−
1
View file @
d893bb10
...
@@ -60,6 +60,8 @@ class FieldProducerPlugin extends DataProducerPluginBase implements FieldProduce
...
@@ -60,6 +60,8 @@ class FieldProducerPlugin extends DataProducerPluginBase implements FieldProduce
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
resolveFieldItems
(
FieldItemListInterface
$field
,
FieldContext
$context
):
array
{
public
function
resolveFieldItems
(
FieldItemListInterface
$field
,
FieldContext
$context
):
array
{
/** @var \Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeFieldTypeInterface $plugin */
$plugin
=
$this
->
getContextValue
(
'plugin'
);
$plugin
=
$this
->
getContextValue
(
'plugin'
);
if
(
$plugin
instanceof
FieldProducerItemsInterface
)
{
if
(
$plugin
instanceof
FieldProducerItemsInterface
)
{
...
@@ -68,7 +70,10 @@ class FieldProducerPlugin extends DataProducerPluginBase implements FieldProduce
...
@@ -68,7 +70,10 @@ class FieldProducerPlugin extends DataProducerPluginBase implements FieldProduce
$results
=
[];
$results
=
[];
foreach
(
$field
as
$item
)
{
foreach
(
$field
as
$item
)
{
$results
[]
=
$this
->
resolveFieldItem
(
$item
,
$context
);
$result
=
$this
->
resolveFieldItem
(
$item
,
$context
);
if
(
$plugin
->
getPluginId
()
===
'boolean'
||
!
empty
(
$result
))
{
$results
[]
=
$result
;
}
}
}
return
$results
;
return
$results
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment