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
Merge requests
!95
Draft: Resolve
#3462514
"Support for link"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Draft: Resolve
#3462514
"Support for link"
issue/graphql_compose-3462514:3462514-support-for-link
into
2.3.x
Overview
1
Commits
3
Pipelines
3
Changes
5
Closed
Al Munnings
requested to merge
issue/graphql_compose-3462514:3462514-support-for-link
into
2.3.x
9 months ago
Overview
1
Commits
3
Pipelines
3
Changes
5
Expand
Closes
#3462514
0
0
Merge request reports
Compare
2.3.x
version 2
4b8cac26
8 months ago
version 1
cba9dc0d
9 months ago
2.3.x (base)
and
latest version
latest version
4b8cac26
3 commits,
8 months ago
version 2
4b8cac26
7 commits,
8 months ago
version 1
cba9dc0d
2 commits,
9 months ago
5 files
+
172
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
modules/graphql_compose_linkattributes/src/Plugin/GraphQLCompose/SchemaType/LinkAttributes.php
0 → 100644
+
69
−
0
Options
<?php
declare
(
strict_types
=
1
);
namespace
Drupal\graphql_compose_linkattributes\Plugin\GraphQLCompose\SchemaType
;
use
Drupal\graphql_compose
\Plugin\GraphQLCompose\GraphQLComposeSchemaTypeBase
;
use
GraphQL\Type\Definition\ObjectType
;
use
GraphQL\Type\Definition\Type
;
/**
* {@inheritdoc}
*
* @GraphQLComposeSchemaType(
* id = "LinkAttributes",
* )
*/
class
LinkAttributes
extends
GraphQLComposeSchemaTypeBase
{
/**
* {@inheritdoc}
*/
public
function
getTypes
():
array
{
$types
=
[];
$types
[]
=
new
ObjectType
([
'name'
=>
$this
->
getPluginId
(),
'description'
=>
(
string
)
$this
->
t
(
'Link item attributes set within the CMS.'
),
'fields'
=>
function
()
{
$fields
[
'id'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The ID of the link.'
,
];
$fields
[
'name'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The name of the link.'
,
];
$fields
[
'title'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The title of the link.'
,
];
$fields
[
'target'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The target of the link.'
,
];
$fields
[
'rel'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The rel of the link.'
,
];
$fields
[
'class'
]
=
[
'type'
=>
Type
::
listOf
(
Type
::
string
()),
'description'
=>
'The classes of the link.'
,
];
$fields
[
'accessKey'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The accesskey of the link.'
,
];
$fields
[
'ariaLabel'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The aria_label of the link.'
,
];
return
$fields
;
},
]);
return
$types
;
}
}
Loading