- 🇦🇺Australia almunnings Melbourne, 🇦🇺
I'm conflicted on this.
On one hand, Node spec is nice to have.
On the other, Drupal makes this a confusing query to have. Anyone that knows what a node is expects the node to be a... drupal node. Not a hypothetical interface node,You could namespace all Drupal nodes as "Content", which you could do by changing the "prefix" in Plugin/GraphQLCompose/EntityType/Node.php to "Content", as this is a plugin, you can do that yourself by overriding the node plugin class.
function mymodule_graphql_compose_entity_type_alter(array &$info) { if (isset($info['node'])) { $info['node']['class'] = '\Drupal\mymodule\MyCustomNodePlugin'; } }
Then just hack away as much as you want. If you wanted to create your own query and use the `entity_load_by_uuid` producer. Thats all possible.
---
I'd actually prefer to just not use the Node interface. Which means decoupling it out of the Open Social Edge code.
- Status changed to Postponed
over 1 year ago 1:14am 13 April 2023 - 🇦🇺Australia almunnings Melbourne, 🇦🇺
Following up on this, I think I'm going to just move away from Node as the interpretation of global-object-identification.
We use GOI in its intended way with:
nodePage(id): NodePage
and NodePage has ID!According to the never untruthful always correct ChatGPT:
GraphQL's Global Object Identification is a pattern used to uniquely identify objects across an entire GraphQL API, regardless of their underlying data storage or schema. It ensures that each object has a globally unique identifier (ID) that can be used to fetch the object from the API.
Which we do by using UUIDs in the ID! field.
The interface Node { id: ID! } is just confusing to anyone that knows Drupal.
🚮
- Assigned to almunnings
- Status changed to Active
over 1 year ago 12:54am 19 June 2023 - Status changed to Closed: won't fix
over 1 year ago 5:08am 19 June 2023 - 🇦🇺Australia almunnings Melbourne, 🇦🇺
Node has been removed into latest dev. Closing issue.