graphql-metatag's People
Forkers
pasqualle pavlosdan simgroep lucasconstantino tallerwebsolutions mtodor areebmoin joaogarin gheydon acha5066 carolpettirossi edurenyegraphql-metatag's Issues
How to get global metatg
Hello
Is it possible to get global metatags of website in GraphQL? (not the metatag relate to an entity)
New release
Hello,
Would like to ask what's the current status of the module, and if I could be of help in any way. I am really hoping to use the module (already are using) so wouldn't mind supporting as much as possible.
Currently I get the error: "
Unable to resolve insecure field ...
solved in 48140c3 I believe so maybe just a new release on drupal.org would already help me (currently adding the module via composer)
Support for JSON-LD MetaTags
We are using schema_metatag module on our project and problem is when I want to fetch metatags, I get errors thrown for JSON-LD metatags.
Here is example of error String cannot represent non scalar value: associative array(4) with first keys: "@type", "name", "url", "logo"
.
Problem is that Metatag.value
field is defined as String
, but we have an array in this case.
Any ideas on how we can add support for this?
This module doesn't seem to work with page:current-title for group content
Hi,
I'm using a setup with Group module and each Group node entity has metatags via a metatags field.
Unfortunately this doesn't seem to be working with this module.
If I use the metatagentity like so:
{
route(path: "/group/1/content/12") {
... on EntityCanonicalUrl {
entity {
... on GroupContentGroupContentType0d2cbf8dd6346 {
entityMetatags{
key
value
}
entityIdOfGroupContent {
targetId
}
}
}
}
}
}
Then I get always the metatag of the GraphiQL explorer unless I specify a metatag on the group node that overrides the default patterns.
If on the other hand I actually try to obtain the values via the metatag field like so:
{
route(path: "/group/1/content/12") {
... on EntityCanonicalUrl {
entity {
... on GroupContentGroupContentType0d2cbf8dd6346 {
fieldMetatags{
key
value
}
entityIdOfGroupContent {
targetId
}
}
}
}
}
}
Then I get this error:
{
"errors": [
{
"debugMessage": "Abstract type Metatag must resolve to an Object type at runtime for field GroupContentGroupContentType0d2cbf8dd6346.fieldMetatags with value \"\"a:0:{}\"\", received \"null\".",
"message": "Internal server error",
"category": "internal",
"locations": [
{
"line": 6,
"column": 11
}
],
"path": [
"route",
"entity",
"fieldMetatags"
]
}
],
"data": {
"route": {
"entity": {
"fieldMetatags": null,
"entityIdOfGroupContent": {
"targetId": 11
}
}
}
}
}
Any help would be really appreciated ๐
Thanks!
The hook_metatags_alter() is not working
I'm currently implementing programmatically changes to metatags via hook_metatags_alter() call, but this changes are not visible in GraphQL metatag queries.
Would be nice if API calls provided by metatag contrib module are also working for GraphQL metatag queries.
D9 readiness
Upgrade status reports only one warning:
Add core_version_requirement: ^8 || ^9 to designate that the module is compatible with Drupal 9. See https://drupal.org/node/3070687.
Please, review #19 to get the module available on D9 too.
Anonymous : Internal server error running query
So I was trying out the module, everything worked really nicely. I did open a doc PR for graphql, I think it makes sense to have "GraphqQL Documentation" all together in one place. instead of opening docs in all the subrepos.
While doing a query for metatag and talking on the slack channel found that there is an issue with the graphql_metatag module integration (perhaps its an issue with Metatag module itself)
query findJob($slug: String!) {
route(path: $slug) {
... on EntityCanonicalUrl {
entity {
entityLabel
entityMetatags {
key
value
}
}
}
}
}
returns an internal server error as an anonymous user. Couldn't find anything really relevant in the logs..at least not in db logs. I Will try and dig a bit deeper later to see if I can get some more info
[QUESTION] Is possible to change __typename for title?
Hi,
on my current project have following function:
_headMetaTagRedered(typename, key, value, index) {
switch (typename) {
case "MetaLink":
return(
<link key={index} rel={key} href={value} />
);
case "MetaValue":
return(
<meta key={index} name={key} content={value}/>
);
default:
return;
}
};
Idea is to print all meta tags in one loop
<Head>
{data.route.entity.metaTags.map((tag, index) => {
return(
this._headMetaTagRedered( tag.__typename, tag.key, tag.value, index)
)
})}
</Head>
But key
value for title
is MetaValue
so is not possible to make right switch case check to print <title>{value}</title>
Could you consider the case above and give as feedback if title
have to be MetaValue
?
Undefined index: name
When on the content screen in the admin, I'll occasionally get this PHP notice.
Notice: Undefined index: name in Drupal\graphql_metatag\Plugin\GraphQL\Fields\Metatag\Key->resolveValues() (line 25 of modules/contrib/graphql_metatag/src/Plugin/GraphQL/Fields/Metatag/Key.php).
Drupal\graphql_metatag\Plugin\GraphQL\Fields\Metatag\Key->resolveValues(Array, Array, Object, Object)
iterator_to_array(Object) (Line: 163)
Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase->Drupal\graphql\Plugin\GraphQL\Fields\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 166)
Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase->Drupal\graphql\Plugin\GraphQL\Fields\{closure}() (Line: 171)
Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase->resolveDeferred(Array, Array, Array, Object, Object) (Line: 130)
Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase->resolve(Array, Array, Object, Object) (Line: 65)
Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase::Drupal\graphql\Plugin\GraphQL\Fields\{closure}(Array, Array, Object, Object) (Line: 781)
GraphQL\Executor\Executor->resolveOrError(Object, Object, Object, Array, Object, Object) (Line: 744)
GraphQL\Executor\Executor->resolveField(Object, Array, Object, Array) (Line: 473)
GraphQL\Executor\Executor->executeFields(Object, Array, Array, Object) (Line: 1321)
GraphQL\Executor\Executor->collectAndExecuteSubfields(Object, Object, Object, Array, Array) (Line: 1280)
GraphQL\Executor\Executor->completeObjectValue(Object, Object, Object, Array, Array) (Line: 1120)
GraphQL\Executor\Executor->completeAbstractValue(Object, Object, Object, Array, Array) (Line: 992)
GraphQL\Executor\Executor->completeValue(Object, Object, Object, Array, Array) (Line: 876)
GraphQL\Executor\Executor->completeValueWithLocatedError(Object, Object, Object, Array, Array) (Line: 830)
GraphQL\Executor\Executor->completeValueCatchingError(Object, Object, Object, Array, Array) (Line: 1199)
GraphQL\Executor\Executor->completeListValue(Object, Object, Object, Array, Array) (Line: 968)
GraphQL\Executor\Executor->completeValue(Object, Object, Object, Array, Array) (Line: 876)
GraphQL\Executor\Executor->completeValueWithLocatedError(Object, Object, Object, Array, Array) (Line: 830)
GraphQL\Executor\Executor->completeValueCatchingError(Object, Object, Object, Array, Array) (Line: 752)
GraphQL\Executor\Executor->resolveField(Object, Object, Object, Array) (Line: 473)
GraphQL\Executor\Executor->executeFields(Object, Object, Array, Object) (Line: 1321)
GraphQL\Executor\Executor->collectAndExecuteSubfields(Object, Object, Object, Array, Object) (Line: 1280)
GraphQL\Executor\Executor->completeObjectValue(Object, Object, Object, Array, Object) (Line: 1120)
GraphQL\Executor\Executor->completeAbstractValue(Object, Object, Object, Array, Object) (Line: 992)
GraphQL\Executor\Executor->completeValue(Object, Object, Object, Array, Object) (Line: 876)
GraphQL\Executor\Executor->completeValueWithLocatedError(Object, Object, Object, Array, Object) (Line: 830)
GraphQL\Executor\Executor->completeValueCatchingError(Object, Object, Object, Array, Object) (Line: 1199)
GraphQL\Executor\Executor->completeListValue(Object, Object, Object, Array, Array) (Line: 968)
GraphQL\Executor\Executor->completeValue(Object, Object, Object, Array, Array) (Line: 935)
GraphQL\Executor\Executor->GraphQL\Executor\{closure}(Array) (Line: 135)
GraphQL\Executor\Promise\Adapter\SyncPromise->GraphQL\Executor\Promise\Adapter\{closure}() (Line: 35)
GraphQL\Executor\Promise\Adapter\SyncPromise::runQueue() (Line: 140)
GraphQL\Executor\Promise\Adapter\SyncPromiseAdapter->wait(Object) (Line: 120)
Drupal\graphql\GraphQL\Execution\QueryProcessor->executeSingle(Object, Object) (Line: 108)
Drupal\graphql\GraphQL\Execution\QueryProcessor->processQuery('default:default', Object) (Line: 82)
Drupal\graphql\Controller\RequestController->handleSingle('default:default', Object) (Line: 70)
Drupal\graphql\Controller\RequestController->handleRequest('default:default', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 41)
Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.